/// <reference types="node" />
import { Manifest } from '../models/index.js';
import { Chunker } from './chunkers.js';
export type CentralDirectory = CentralDirectoryFixedLengthPrefix & CentralDirectoryVariableLengthItems;
export type CentralDirectoryFixedLengthPrefix = {
    versionMadeBy: number;
    versionNeededToExtract: number;
    generalPurposeBitFlag: number;
    compressionMethod: number;
    lastModFileTime: number;
    lastModFileDate: number;
    crc32: number;
    compressedSize: number;
    uncompressedSize: number;
    fileNameLength: number;
    extraFieldLength: number;
    fileCommentLength: number;
    internalFileAttributes: number;
    externalFileAttributes: number;
    relativeOffsetOfLocalHeader: number;
};
export type CentralDirectoryVariableLengthItems = {
    fileName: string;
    headerLength: number;
};
/**
 *
 * ZipReader -
 *
 * This class is used to extract parts of a TDF. You may pull bytes of a given range from a
 * or request specific important chunks like the 'manifest', or 'payload'.
 */
export declare class ZipReader {
    getChunk: Chunker;
    constructor(getChunk: Chunker);
    /**
     * Utility function to get the centralDirectory for the zip file.
     * @param  {Buffer} chunkBuffer Takes a buffer of a portion of the file
     * @return {Object}             The central directory represented as an object
     */
    getCentralDirectory(): Promise<CentralDirectory[]>;
    /**
     * Gets the manifest
     * @returns The manifest as a buffer represented as JSON
     */
    getManifest(cdBuffers: CentralDirectory[], manifestFileName: string): Promise<Manifest>;
    adjustHeaders(cdObj: CentralDirectory): Promise<void>;
    getPayloadSegment(cdBuffers: CentralDirectory[], payloadName: string, encrpytedSegmentOffset: number, encryptedSegmentSize: number): Promise<Buffer>;
    /**
     * Takes a portion of a ZIP (must be the last portion of a ZIP to work) and returns an array of Buffers
     * that correspond to each central directory.
     * @param  {Buffer} chunkBuffer The last portion of a zip file
     * @returns {Array}             An array of buffers
     */
    getCDBuffers(chunkBuffer: Buffer): Buffer[];
}
/**
 * Takes a central directory buffer and turns it into a manageable object
 * that represents the CD
 * @param  cdBuffer The central directory buffer to parse
 * @return The CD object
 */
export declare function parseCDBuffer(cdBuffer: Buffer): CentralDirectory;
export declare function readUInt64LE(buffer: Buffer, offset: number): number;
//# sourceMappingURL=zip-reader.d.ts.map