/** * Utility for splitting streaming data into line-based chunks. * Buffers incomplete lines between chunks and handles newline characters correctly. * Useful for processing server-sent events or other line-based streaming protocols. */ export declare class LineDecoder { private lineBuffer; private decoder; private encoder; /** * Splits the given chunk into lines. * Stores incomplete lines in a buffer and returns them when the next chunk arrives. * * @param chunk - The data chunk to split into lines * @returns An array of complete lines as Uint8Array */ splitLines(chunk: Uint8Array): Uint8Array[]; /** * Returns the remaining lines in the buffer. * Call this after the stream ends to get any incomplete final line. * * @returns An array containing the buffered line, or empty if buffer is empty */ flush(): Uint8Array[]; } //# sourceMappingURL=line-decoder.d.ts.map