File size: 768 Bytes
1070765
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
export declare class ChunkCache {
    index: number;
    xorbIndices: Int32Array;
    chunkIndices: Uint16Array;
    map: Map<string, number>;
    hmacs: Set<string>;
    maxSize: number;
    constructor(maxSize?: number);
    addChunkToCache(hash: string, xorbIndex: number, chunkIndex: number, hmac: string | null): void;
    getChunk(hash: string, 
    /**
     * Set to null if you only want to check against locally created chunks, or the hash is already a hmac
     */
    hmacFunction: ((hash: string, key: string) => string) | null): {
        xorbIndex: number;
        chunkIndex: number;
    } | undefined;
    updateChunkIndex(hash: string, chunkIndex: number): void;
    removeChunkFromCache(hash: string): void;
}
//# sourceMappingURL=ChunkCache.d.ts.map