import type { DifyAccessor } from '../../accessor/dify.ts';
import type { FileStat, PathSpec } from '../../types.ts';
export declare function segmentText(segment: Record<string, unknown>): string;
/**
 * Read a document, optionally only a byte range of it.
 *
 * A document is rendered here from its segments, so its bytes do not exist
 * until we make them and the window can only be taken afterwards, the same
 * way the rendered branches of gdrive, slack and discord take theirs.
 *
 * Args:
 *   accessor: Dify accessor.
 *   path: the path to read.
 *   entry: what is at the path.
 *   options: `{offset, size}`, the byte window, or absent for the whole file.
 */
export declare function read(accessor: DifyAccessor, path: PathSpec, entry?: FileStat | null, options?: {
    offset?: number;
    size?: number;
}): Promise<Uint8Array>;
export declare function readStream(accessor: DifyAccessor, path: PathSpec, entry?: FileStat | null): AsyncIterable<Uint8Array>;
//# sourceMappingURL=read.d.ts.map