import * as fs from 'fs';
/**
 * Largest source file CodeGraph will parse or read during resolution. Generated
 * bundles, minified sources, and dependency archives above this limit provide no
 * useful symbols; 1 MB covers essentially all hand-written source.
 */
export declare const MAX_SOURCE_FILE_SIZE_BYTES: number;
/**
 * What stands in for the content of a file over MAX_SOURCE_FILE_SIZE_BYTES. Such a file is
 * never parsed, so its bytes are never needed — reading them only to hash and
 * discard cost multi-GB RSS spikes on committed video/blob fixtures and could
 * fail outright with `Invalid string length` (#1910). The stamp is a function
 * of size alone: change detection compares it to the stored hash, so a
 * same-size rewrite of an oversize file is not a change (nothing about it is
 * indexed), while crossing the limit in either direction is.
 */
export declare function oversizeStamp(size: number): string;
/**
 * The text whose hash the index stores for a file of `size` bytes: its content
 * within the limit, the size stamp over it. Anything that checks a file on disk
 * against its stored `contentHash` has to hash this, or every unchanged file
 * over the limit reads as drifted. `content` is only read within the limit.
 */
export declare function indexedHashInput(size: number, content: () => string): string;
/** A source file's stats, and its bytes when they are within the limit (null = oversize). */
export interface BoundedSource {
    stats: fs.Stats;
    bytes: Buffer | null;
}
/**
 * Read a source file without ever holding more than the limit plus one byte.
 * A stat before the read is not enough: the file can grow between the stat
 * and the read (a log, a download, a build output being written), so the
 * descriptor is re-checked after opening and the read itself stops one byte
 * past the limit. Returns `bytes: null` for an oversize file.
 */
export declare function readBoundedSource(file: string): Promise<BoundedSource>;
/** Synchronous {@link readBoundedSource}. */
export declare function readBoundedSourceSync(file: string): BoundedSource;
//# sourceMappingURL=file-limits.d.ts.map