♻️ readSsnFile now reads all file entries

This commit is contained in:
C-3PO 2018-06-22 13:13:09 +02:00
parent 1a623aa42d
commit 9899514578
Signed by: c3po
GPG key ID: 62993C4BB4D86F24
4 changed files with 202 additions and 147 deletions

View file

@ -0,0 +1,29 @@
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;
}
export default ISsnFileEntry;