# Class LineDecoder

A re-implementation of httpx's `LineDecoder` in Python that handles incrementally reading lines from text.

Https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258.

- Defined in packages/core/dist/stream/line-decoder.d.ts:8

##### Index

### Constructors

constructor

### Properties

buffer
textDecoder
trailingCR
NEWLINE_CHARS
NEWLINE_REGEXP

### Methods

decode
decodeText
flush

Copyright Ⓒ 2026 SAP SE or an SAP affiliate company. All rights reserved.

## Constructors

### constructor

- new LineDecoder(): LineDecoder

  #### Returns LineDecoder

  - Defined in packages/core/dist/stream/line-decoder.d.ts:14

## Properties

### buffer

buffer: string[]

- Defined in packages/core/dist/stream/line-decoder.d.ts:11

### textDecoder

textDecoder: any

- Defined in packages/core/dist/stream/line-decoder.d.ts:13

### trailingCR

trailingCR: boolean

- Defined in packages/core/dist/stream/line-decoder.d.ts:12

### `Static` NEWLINE_CHARS

NEWLINE_CHARS: Set<string>

- Defined in packages/core/dist/stream/line-decoder.d.ts:9

### `Static` NEWLINE_REGEXP

NEWLINE_REGEXP: RegExp

- Defined in packages/core/dist/stream/line-decoder.d.ts:10

## Methods

### decode

- decode(chunk: Bytes): string[]

  #### Parameters

  - chunk: Bytes

  #### Returns string[]

  - Defined in packages/core/dist/stream/line-decoder.d.ts:15

### decodeText

- decodeText(bytes: Bytes): string

  #### Parameters

  - bytes: Bytes

  #### Returns string

  - Defined in packages/core/dist/stream/line-decoder.d.ts:16

### flush

- flush(): string[]

  #### Returns string[]

  - Defined in packages/core/dist/stream/line-decoder.d.ts:17