UNPKG

@hazae41/kdbx

Version:

Rust-like KeePass (KDBX 4) file format for TypeScript

48 lines (46 loc) 1.5 kB
'use strict'; exports.Compression = void 0; (function (Compression) { (function (None) { None.type = 0x00; function cloneOrThrow() { return None; } None.cloneOrThrow = cloneOrThrow; function sizeOrThrow() { return 4; } None.sizeOrThrow = sizeOrThrow; function writeOrThrow(cursor) { cursor.writeUint32OrThrow(None.type, true); } None.writeOrThrow = writeOrThrow; })(Compression.None || (Compression.None = {})); (function (Gzip) { Gzip.type = 0x01; function cloneOrThrow() { return Gzip; } Gzip.cloneOrThrow = cloneOrThrow; function sizeOrThrow() { return 4; } Gzip.sizeOrThrow = sizeOrThrow; function writeOrThrow(cursor) { cursor.writeUint32OrThrow(Gzip.type, true); } Gzip.writeOrThrow = writeOrThrow; })(Compression.Gzip || (Compression.Gzip = {})); })(exports.Compression || (exports.Compression = {})); (function (Compression) { function readOrThrow(cursor) { const value = cursor.readUint32OrThrow(true); if (value === Compression.None.type) return Compression.None; if (value === Compression.Gzip.type) return Compression.Gzip; throw new Error(); } Compression.readOrThrow = readOrThrow; })(exports.Compression || (exports.Compression = {})); //# sourceMappingURL=index.cjs.map