export interface DeviceInfo {
    deviceIdentifier: string;
    firmwareName: string;
    firmwareVersion: string;
}
interface Block {
    generation: number;
    timestamp: number;
    data: Uint8Array;
}
export interface TraceEvent {
    generation: number;
    timestamp: number;
    type: number;
    payload: Uint8Array;
    decoded?: any;
    human?: string;
}
export declare class GenerationInfo {
    parent: LogInfo;
    index: number;
    firstBlock: number;
    lastBlock: number;
    get numBlocks(): number;
    constructor(parent: LogInfo, index: number);
    toString(): string;
    dump(): Promise<{
        generation: number;
        size: number;
    }>;
    blockEvents(blockIdx: number, r?: TraceEvent[]): Promise<TraceEvent[]>;
    devInfo(): Promise<DeviceInfo>;
    readEvents(maxBlocks?: number): Promise<TraceEvent[]>;
    computeStats(): Promise<{
        dataSize: number;
        utilizedSize: number;
        numEvents: number;
        avgEventSize: number;
        utilization: number;
    }>;
    forEachEvent(cb?: (ev: TraceEvent) => Promise<void>): Promise<void>;
}
export declare class LogInfo {
    private readfn;
    deviceInfo: DeviceInfo;
    purpose: string;
    comment: string;
    firstGeneration: number;
    lastGeneration: number;
    blockSize: number;
    private generations;
    private dataBlocks;
    private block0Idx;
    _readBlock: (idx: number) => Promise<Block>;
    generation(gen: number): Promise<GenerationInfo>;
    dump(): Promise<{
        deviceInfo: DeviceInfo;
        purpuse: string;
        comment: string;
        size: number;
        generations: any[];
    }>;
    constructor(readfn: (off: number, size: number) => Promise<Uint8Array>);
    _load(): Promise<void>;
    private findLastBlock;
}
export declare function parseLog(readfn: (off: number, size: number) => Promise<Uint8Array>): Promise<LogInfo>;
export declare function parseLogFile(f: File): Promise<LogInfo>;
export declare function crc32(data: Uint8Array): number;
export {};
//# sourceMappingURL=logparser.d.ts.map