export declare function parseByteCount(raw: string): number; export declare function parseN(n: string | null): [number, boolean]; export interface TailCounts { lines: number | null; fromLine: number | null; byteCount: number | null; fromByte: number | null; } /** * Fill in whatever a caller left off a `TailCounts`. * * The struct is a plain object, so a caller that omits a field — or a * JavaScript one that passes something else entirely — supplies undefined, * and a bare `!== null` test waves that straight into the first branch, * where `slice(NaN)` quietly returns the whole input. Python's twin is a * dataclass whose four fields all default to None and has no such hole; * reading every field through `?? null` gives this side the same floor. */ export declare function normalizeCounts(counts: TailCounts): TailCounts; /** * Split tail's `-n`/`-c` values by which end they count from. * * GNU gives both flags the same sign grammar: a leading `+` counts forward * from the start of the input, 1-indexed, so `+0` and `+1` both mean the * whole thing; any other spelling counts back from the end. Every caller * used to apply that grammar to `-n` and take the absolute value of `-c`, * which silently turned `tail -c +3` into the last three bytes — so the * split lives here, once, beside the parser it is built from. Mirrors * Python's `parse_counts`. */ export declare function parseCounts(nRaw: string | null, cRaw: string | null): TailCounts; export declare function numberFlagError(cmd: string, nRaw: string | null, cRaw: string | null): string | null; export declare function tailBytes(data: Uint8Array, rawCounts: TailCounts): Uint8Array; export declare function countNewlines(data: Uint8Array): number; //# sourceMappingURL=tail_counts.d.ts.map