import { type WorkspaceFileContent } from "../workspace/WorkspaceFileReader.js";
/**
 * Decode a GitHub base64 payload to raw bytes.
 *
 * GitHub's Contents API line-wraps its base64 with `\n` every 60 chars, and
 * `atob` rejects embedded newlines in some engines — strip all ASCII
 * whitespace first.
 */
export declare function base64ToBytes(b64: string): Uint8Array;
/** Detect binary content via a NUL byte in the head of the buffer. */
export declare function detectBinary(bytes: Uint8Array): boolean;
/**
 * Decode bytes as strict UTF-8, returning `null` when the sequence is invalid.
 * `{ fatal: true }` makes `TextDecoder` throw rather than emit replacement
 * characters, so undecodable files degrade to the binary/unknown fallback
 * instead of silently rendering mojibake.
 */
export declare function bytesToText(bytes: Uint8Array): string | null;
/**
 * Turn decoded bytes into a {@link WorkspaceFileContent}, applying binary
 * detection and the shared 1 MB display cap.
 *
 * @param bytes    the full decoded bytes as delivered by GitHub
 * @param fullSize the file's true size in bytes (GitHub's `size` field), which
 *                 may exceed `bytes.length` when the caller has already capped
 *                 the download — reported verbatim as `size`.
 */
export declare function normalizeGitHubContent(bytes: Uint8Array, fullSize: number): WorkspaceFileContent;
//# sourceMappingURL=decodeGitHubContent.d.ts.map