ssn/src/interfaces/ISsnFileEntry.ts

38 lines
1.3 KiB
TypeScript
Raw Normal View History

enum SsnDiffType {
/** We included the original file contents, not just the differences, because file is new or it's in a format that's not suitable for diffing. */
NewFile = 0,
/** File is not included in the .zip archive because it has been deleted. */
Deleted = 1,
/** File has changed and we include the differences, encoded in vcdiff/xdelta3 */
Changed = 2,
/** File is not included in the .zip archive because it hasn't changed */
Unchanged = 3,
}
interface ISsnFileEntry {
/** CRC-32 checksum of this file. */
crc: number;
/** If we only store the differences, the size of the destination file. */
diffDestLength: number;
/** If we only store the differences, the size of the source file. */
diffSourceLength: number;
/** Whether this file was changed or not, or whether it was newly added or deleted. */
diffType: SsnDiffType;
/** The date and time when this file was last modified. */
lastMod: Date;
/** File name */
name: string;
/** Uncompressed size */
size: number;
2018-06-22 13:29:33 +02:00
/** Compressed size */
comprSize: number;
/** Decryption keys needed to decrypt the file */
decryptionKeys: [number, number, number] | undefined;
2018-06-22 15:53:37 +02:00
/** Number of the disk where the file is stored (0=.z01, 1=.z02 etc.) */
diskNumberStart: number;
/** Offset */
offset: number;
}
export default ISsnFileEntry;