compound-binary-file-js
Version:
This is an implementation of [Compound Binary File v.3](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/53989ce4-7b05-4f8d-829b-d08d6148375b) \ Allows reading existing files, creation of the/write operation
17 lines (16 loc) • 790 B
TypeScript
import { Sectors } from "../Sectors";
import "../Long";
import { Sector } from "../dataview/Sector";
export declare class AllocationTable {
static readonly ENTRIES_IN_ONE_FAT_SECTOR = 128;
protected readonly sectors: Sectors;
protected readonly sectorChain: number[];
private readonly sectorSize;
constructor(sectors: Sectors, sectorChain: number[], sectorSize: number);
buildChain(currentSector: number): number[];
getValueAt(position: number): number;
registerSector(sectorPosition: number, previousSectorPosition: number): void;
protected getFatSectorPointingToAllocatedSector(sectorPosition: number): Sector;
protected allocateNewSector(): Sector;
protected calculatePositionInsideFatSector(sectorPosition: number): number;
}