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
55 lines (54 loc) • 2.28 kB
TypeScript
import { CFDataview } from "./dataview/СFDataview";
export declare class Header {
static FLAG_POSITION: {
SIGNATURE: number;
CLSID: number;
MINOR_VERSION: number;
MAJOR_VERSION: number;
BYTE_ORDER: number;
SECTOR_SHIFT: number;
MINI_SECTOR_SHIFT: number;
MINI_STREAM_CUTOFF_SIZE_POSITION: number;
FIRST_DIRECTORY_SECTOR: number;
NUMBER_OF_FAT_SECTORS: number;
FIRST_MINIFAT_SECTOR: number;
NUMBER_OF_MINIFAT_SECTORS: number;
FIRST_DIFAT_SECTOR: number;
NUMBER_OF_DIFAT_SECTORS: number;
DIFAT_ENTRIES_FIRST_POSITION: number;
};
static readonly HEADER_SIGNATURE: number[];
static readonly MAJOR_VERSION_3: number[];
static readonly MINOR_VERSION_3: number[];
static readonly BYTE_ORDER_LITTLE_ENDIAN: number[];
static readonly SECTOR_SHIFT_VERSION_3: number[];
static readonly SECTOR_SHIFT_VERSION_3_INT: number;
static readonly MINI_SECTOR_SHIFT_VERSION_3: number[];
static readonly MINI_SECTOR_SHIFT_VERSION_3_INT: number;
static readonly MINI_STREAM_CUTOFF_SIZE_INT = 4096;
static readonly MINI_STREAM_CUTOFF_SIZE: number[];
static readonly HEADER_LENGTH = 512;
static readonly DIFAT_ENTRIES_LIMIT_IN_HEADER: number;
private readonly dataView;
private readonly difatEntries;
static empty(dataView: CFDataview): Header;
constructor(dataView: CFDataview);
getFirstDirectorySectorLocation(): number;
getNumberOfFatSectors(): number;
getFirstMinifatSectorLocation(): number;
getFirstDifatSectorLocation(): number;
getNumberOfMiniFatSectors(): number;
getNumberOfDifatSectors(): number;
getDifatEntries(): number[];
canFitMoreDifatEntries(): boolean;
setNumberOfFatSectors(i: number): void;
setFirstDirectorySectorLocation(i: number): void;
setFirstMinifatSectorLocation(i: number): void;
setNumberOfMiniFatSectors(i: number): void;
setFirstDifatSectorLocation(i: number): void;
setNumberOfDifatSectors(i: number): void;
getSectorShift(): number;
getMiniSectorShift(): number;
getMiniStreamCutoffSize(): number;
registerFatSector(sectorPosition: number): void;
}