From 08a0fd8e6cfc1a8564818e726c6777bd7927571d Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Fri, 26 Jan 2024 09:25:10 -0800 Subject: [PATCH] Updat TS types --- types/archive/common.d.ts | 38 +++++++++++++++++++++++- types/archive/common.d.ts.map | 2 +- types/archive/decompress.d.ts.map | 2 +- types/archive/events.d.ts | 32 +++++--------------- types/archive/events.d.ts.map | 2 +- types/file/sniffer.d.ts.map | 2 +- types/image/parsers/parsers.d.ts | 2 +- types/image/parsers/png.d.ts | 4 +-- types/image/parsers/png.d.ts.map | 2 +- types/image/webp-shim/webp-shim.d.ts.map | 2 +- types/index.d.ts | 4 ++- types/index.d.ts.map | 2 +- types/io/bitbuffer.d.ts.map | 2 +- types/io/bitstream.d.ts | 7 +++++ types/io/bitstream.d.ts.map | 2 +- types/io/bytebuffer.d.ts.map | 2 +- types/io/bytestream.d.ts | 2 +- 17 files changed, 69 insertions(+), 40 deletions(-) diff --git a/types/archive/common.d.ts b/types/archive/common.d.ts index a252b23..531b4f7 100644 --- a/types/archive/common.d.ts +++ b/types/archive/common.d.ts @@ -1,12 +1,18 @@ /** * common.js * - * Provides common functionality for compressing and decompressing. + * Provides common definitions or functionality needed by multiple modules. * * Licensed under the MIT License * * Copyright(c) 2023 Google Inc. */ +/** + * @typedef FileInfo An object that is sent to the implementation representing a file to compress. + * @property {string} fileName The name of the file. TODO: Includes the path? + * @property {number} lastModTime The number of ms since the Unix epoch (1970-01-01 at midnight). + * @property {Uint8Array} fileData The bytes of the file. + */ /** * @typedef Implementation * @property {MessagePort} hostPort The port the host uses to communicate with the implementation. @@ -24,6 +30,36 @@ * MessagePort connected to the implementation that the host should use. */ export function getConnectedPort(implFilename: string): Promise; +export const LOCAL_FILE_HEADER_SIG: 67324752; +export const CENTRAL_FILE_HEADER_SIG: 33639248; +export const END_OF_CENTRAL_DIR_SIG: 101010256; +export const CRC32_MAGIC_NUMBER: 3988292384; +export const ARCHIVE_EXTRA_DATA_SIG: 134630224; +export const DIGITAL_SIGNATURE_SIG: 84233040; +export const END_OF_CENTRAL_DIR_LOCATOR_SIG: 117853008; +export const DATA_DESCRIPTOR_SIG: 134695760; +export type ZipCompressionMethod = number; +export namespace ZipCompressionMethod { + const STORE: number; + const DEFLATE: number; +} +/** + * An object that is sent to the implementation representing a file to compress. + */ +export type FileInfo = { + /** + * The name of the file. TODO: Includes the path? + */ + fileName: string; + /** + * The number of ms since the Unix epoch (1970-01-01 at midnight). + */ + lastModTime: number; + /** + * The bytes of the file. + */ + fileData: Uint8Array; +}; export type Implementation = { /** * The port the host uses to communicate with the implementation. diff --git a/types/archive/common.d.ts.map b/types/archive/common.d.ts.map index f952810..802e73b 100644 --- a/types/archive/common.d.ts.map +++ b/types/archive/common.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../archive/common.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;GAIG;AAEH;;;;;;;;;;GAUG;AACH,+CANW,MAAM,GAGJ,QAAQ,cAAc,CAAC,CA0BnC;;;;;cAtCa,WAAW"} \ No newline at end of file +{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../archive/common.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;GAKG;AAEH;;;;GAIG;AAEH;;;;;;;;;;GAUG;AACH,+CANW,MAAM,GAGJ,QAAQ,cAAc,CAAC,CA0BnC;AAID,6CAAgD;AAChD,+CAAkD;AAClD,+CAAiD;AACjD,4CAA6C;AAC7C,+CAAiD;AACjD,6CAAgD;AAChD,uDAAyD;AACzD,4CAA8C;mCAIpC,MAAM;;;;;;;;;;;;cA5DF,MAAM;;;;iBACN,MAAM;;;;cACN,UAAU;;;;;;cAKV,WAAW"} \ No newline at end of file diff --git a/types/archive/decompress.d.ts.map b/types/archive/decompress.d.ts.map index 0fc8e9e..934b2d1 100644 --- a/types/archive/decompress.d.ts.map +++ b/types/archive/decompress.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"decompress.d.ts","sourceRoot":"","sources":["../../archive/decompress.js"],"names":[],"mappings":"AAkSA;;;;;;;;;;GAUG;AACH,kCARW,WAAW,YAGX,iBAAiB,GAAC,MAAM,GAGtB,UAAU,CAkBtB;AA/RD;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;GAEG;AACH;IAgBE;;;;;;;OAOG;IACH,yBAPW,WAAW,YAGX,iBAAiB,GAAC,MAAM,EAyBlC;IA5CD;;;;;OAKG;IACH,cAAM;IAEN;;;;OAIG;IACH,sBAAc;IAmBZ;;;;OAIG;IACH,cAHU,WAAW,CAGA;IAErB;;;OAGG;IACH,YAFU,OAAO,CAEkB;IAGrC;;;;;OAKG;IACH,qCAJW,UAAU,GAAC,SAAS,GAAC,QAAQ,YAC7B,kCAAkC,QAK5C;IAED;;;;OAIG;IACH,yBAHa,MAAM,CAKlB;IAED;;;;OAIG;IACH,+BAHa,MAAM,CAKlB;IAED;;;;;OAKG;IACH,8BAsBC;IAED;;;;;;OAMG;IACH,yBAaC;IAED;;;;;OAKG;IACH,SAJa,QAAQ,IAAI,CAAC,CAgCzB;IAGD;;;;;;;;OAQG;IACH,WAPW,WAAW,qBAGX,OAAO,oBAgBjB;IAED;;OAEG;IACH,aAOC;CACF;AAID;IACE;;;OAGG;IACH,gBAHW,WAAW,YACX,iBAAiB,EAI3B;CAIF;AAED;IACE;;;OAGG;IACH,gBAHW,WAAW,YACX,iBAAiB,EAI3B;CAIF;AAED;IACE;;;OAGG;IACH,gBAHW,WAAW,YACX,iBAAiB,EAI3B;CAIF;;cA3Pa,MAAM;cACN,UAAU;;;;;;YAKV,OAAO"} \ No newline at end of file +{"version":3,"file":"decompress.d.ts","sourceRoot":"","sources":["../../archive/decompress.js"],"names":[],"mappings":"AAoSA;;;;;;;;;;GAUG;AACH,kCARW,WAAW,YAGX,iBAAiB,GAAC,MAAM,GAGtB,UAAU,CAkBtB;AAjSD;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;GAEG;AACH;IAgBE;;;;;;;OAOG;IACH,yBAPW,WAAW,YAGX,iBAAiB,GAAC,MAAM,EAyBlC;IA5CD;;;;;OAKG;IACH,cAAM;IAEN;;;;OAIG;IACH,sBAAc;IAmBZ;;;;OAIG;IACH,cAHU,WAAW,CAGA;IAErB;;;OAGG;IACH,YAFU,OAAO,CAEkB;IAGrC;;;;;OAKG;IACH,qCAJW,UAAU,GAAC,SAAS,GAAC,QAAQ,YAC7B,kCAAkC,QAK5C;IAED;;;;OAIG;IACH,yBAHa,MAAM,CAKlB;IAED;;;;OAIG;IACH,+BAHa,MAAM,CAKlB;IAED;;;;;OAKG;IACH,8BAsBC;IAED;;;;;;OAMG;IACH,yBAaC;IAED;;;;;OAKG;IACH,SAJa,QAAQ,IAAI,CAAC,CAgCzB;IAGD;;;;;;;;OAQG;IACH,WAPW,WAAW,qBAGX,OAAO,oBAgBjB;IAED;;OAEG;IACH,aAOC;CACF;AAID;IACE;;;OAGG;IACH,gBAHW,WAAW,YACX,iBAAiB,EAI3B;CAIF;AAED;IACE;;;OAGG;IACH,gBAHW,WAAW,YACX,iBAAiB,EAI3B;CAIF;AAED;IACE;;;OAGG;IACH,gBAHW,WAAW,YACX,iBAAiB,EAI3B;CAIF;;cA3Pa,MAAM;cACN,UAAU;;;;;;YAKV,OAAO"} \ No newline at end of file diff --git a/types/archive/events.d.ts b/types/archive/events.d.ts index fa2939c..4131942 100644 --- a/types/archive/events.d.ts +++ b/types/archive/events.d.ts @@ -7,18 +7,14 @@ export namespace UnarchiveEventType { const INFO: string; const ERROR: string; } -/** - * An unarchive event. - */ +/** An unarchive event. */ export class UnarchiveEvent extends Event { /** * @param {string} type The event type. */ constructor(type: string); } -/** - * Updates all Archiver listeners that an append has occurred. - */ +/** Updates all Unarchiver listeners that an append has occurred. */ export class UnarchiveAppendEvent extends UnarchiveEvent { /** * @param {number} numBytes The number of bytes appended. @@ -30,9 +26,7 @@ export class UnarchiveAppendEvent extends UnarchiveEvent { */ numBytes: number; } -/** - * Useful for passing info up to the client (for debugging). - */ +/** Useful for passing info up to the client (for debugging). */ export class UnarchiveInfoEvent extends UnarchiveEvent { /** * The information message. @@ -40,9 +34,7 @@ export class UnarchiveInfoEvent extends UnarchiveEvent { */ msg: string; } -/** - * An unrecoverable error has occured. - */ +/** An unrecoverable error has occured. */ export class UnarchiveErrorEvent extends UnarchiveEvent { /** * The information message. @@ -50,15 +42,11 @@ export class UnarchiveErrorEvent extends UnarchiveEvent { */ msg: string; } -/** - * Start event. - */ +/** Start event. */ export class UnarchiveStartEvent extends UnarchiveEvent { constructor(); } -/** - * Finish event. - */ +/** Finish event. */ export class UnarchiveFinishEvent extends UnarchiveEvent { /** * @param {Object} metadata A collection fo metadata about the archive file. @@ -66,9 +54,7 @@ export class UnarchiveFinishEvent extends UnarchiveEvent { constructor(metadata?: any); metadata: any; } -/** - * Progress event. - */ +/** Progress event. */ export class UnarchiveProgressEvent extends UnarchiveEvent { /** * @param {string} currentFilename @@ -88,9 +74,7 @@ export class UnarchiveProgressEvent extends UnarchiveEvent { totalUncompressedBytesInArchive: number; totalCompressedBytesRead: number; } -/** - * Extract event. - */ +/** Extract event. */ export class UnarchiveExtractEvent extends UnarchiveEvent { /** * @param {UnarchivedFile} unarchivedFile diff --git a/types/archive/events.d.ts.map b/types/archive/events.d.ts.map index c658df8..5d7045f 100644 --- a/types/archive/events.d.ts.map +++ b/types/archive/events.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../archive/events.js"],"names":[],"mappings":";;;;;;;;;AAqBA;;GAEG;AACH;IACE;;OAEG;IACH,kBAFW,MAAM,EAIhB;CACF;AAED;;GAEG;AACH;IACE;;OAEG;IACH,sBAFW,MAAM,EAUhB;IALC;;;OAGG;IACH,UAFU,MAAM,CAEQ;CAE3B;AAED;;GAEG;AACH;IAOI;;;OAGG;IACH,KAFU,MAAM,CAEF;CAEjB;AAED;;GAEG;AACH;IAOI;;;OAGG;IACH,KAFU,MAAM,CAEF;CAEjB;AAED;;GAEG;AACH;IACE,cAEC;CACF;AAED;;GAEG;AACH;IACE;;OAEG;IACH,4BAGC;IADC,cAAwB;CAE3B;AAGD;;GAEG;AACH;IACE;;;;;;;;OAQG;IACH,6BARW,MAAM,qBACN,MAAM,gCACN,MAAM,0BACN,MAAM,mCACN,MAAM,uBACN,MAAM,4BACN,MAAM,EAchB;IAPC,wBAAsC;IACtC,0BAA0C;IAC1C,qCAAgE;IAChE,4BAA8C;IAC9C,+BAAoD;IACpD,wCAAsE;IACtE,iCAAwD;CAE3D;AAED;;GAEG;AACH;IACE;;OAEG;IACH,4CAOC;IAJC;;OAEG;IACH,+BAAoC;CAEvC"} \ No newline at end of file +{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../archive/events.js"],"names":[],"mappings":";;;;;;;;;AA6BA,0BAA0B;AAC1B;IACE;;OAEG;IACH,kBAFW,MAAM,EAIhB;CACF;AAED,oEAAoE;AACpE;IACE;;OAEG;IACH,sBAFW,MAAM,EAUhB;IALC;;;OAGG;IACH,UAFU,MAAM,CAEQ;CAE3B;AAED,gEAAgE;AAChE;IAOI;;;OAGG;IACH,KAFU,MAAM,CAEF;CAEjB;AAED,0CAA0C;AAC1C;IAOI;;;OAGG;IACH,KAFU,MAAM,CAEF;CAEjB;AAED,mBAAmB;AACnB;IACE,cAEC;CACF;AAED,oBAAoB;AACpB;IACE;;OAEG;IACH,4BAGC;IADC,cAAwB;CAE3B;AAGD,sBAAsB;AACtB;IACE;;;;;;;;OAQG;IACH,6BARW,MAAM,qBACN,MAAM,gCACN,MAAM,0BACN,MAAM,mCACN,MAAM,uBACN,MAAM,4BACN,MAAM,EAchB;IAPC,wBAAsC;IACtC,0BAA0C;IAC1C,qCAAgE;IAChE,4BAA8C;IAC9C,+BAAoD;IACpD,wCAAsE;IACtE,iCAAwD;CAE3D;AAED,qBAAqB;AACrB;IACE;;OAEG;IACH,4CAOC;IAJC;;OAEG;IACH,+BAAoC;CAEvC"} \ No newline at end of file diff --git a/types/file/sniffer.d.ts.map b/types/file/sniffer.d.ts.map index b92b3c8..e541a2f 100644 --- a/types/file/sniffer.d.ts.map +++ b/types/file/sniffer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"sniffer.d.ts","sourceRoot":"","sources":["../../file/sniffer.js"],"names":[],"mappings":"AAyFA;;;GAGG;AACH,mCAqCC;AAED;;;;GAIG;AACH,iCAHW,WAAW,GACT,MAAM,CAoBlB"} \ No newline at end of file +{"version":3,"file":"sniffer.d.ts","sourceRoot":"","sources":["../../file/sniffer.js"],"names":[],"mappings":"AA0FA;;;GAGG;AACH,mCAqCC;AAED;;;;GAIG;AACH,iCAHW,WAAW,GACT,MAAM,CAoBlB"} \ No newline at end of file diff --git a/types/image/parsers/parsers.d.ts b/types/image/parsers/parsers.d.ts index 03cb3c2..7b51e2d 100644 --- a/types/image/parsers/parsers.d.ts +++ b/types/image/parsers/parsers.d.ts @@ -3,7 +3,7 @@ * @template T * @param {string} type The event type. * @param {T} data The event data. - * @return {CustomEvent} The new event. + * @returns {CustomEvent} The new event. */ export function createEvent(type: string, data: T): CustomEvent; //# sourceMappingURL=parsers.d.ts.map \ No newline at end of file diff --git a/types/image/parsers/png.d.ts b/types/image/parsers/png.d.ts index cd04e36..84d8a76 100644 --- a/types/image/parsers/png.d.ts +++ b/types/image/parsers/png.d.ts @@ -170,10 +170,10 @@ export class PngParser extends EventTarget { onSuggestedPalette(listener: (arg0: CustomEvent) => void): PngParser; /** * Type-safe way to bind a listener for a PngTextualData. - * @param {function(PngTextualData): void} listener + * @param {function(CustomEvent): void} listener * @returns {PngParser} for chaining */ - onTextualData(listener: (arg0: PngTextualData) => void): PngParser; + onTextualData(listener: (arg0: CustomEvent) => void): PngParser; /** * Type-safe way to bind a listener for a PngTransparency. * @param {function(CustomEvent): void} listener diff --git a/types/image/parsers/png.d.ts.map b/types/image/parsers/png.d.ts.map index 480df78..19fb2c7 100644 --- a/types/image/parsers/png.d.ts.map +++ b/types/image/parsers/png.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"png.d.ts","sourceRoot":"","sources":["../../../image/parsers/png.js"],"names":[],"mappings":"gCAuBW,MAAM;;;;;;;;;;;;;;;;;;;2BAuBN,MAAM;;;;;;;;iCASN,MAAM;;;;;;;;;AA+GjB;;;;;GAKG;AAEH,uDAAuD;AAEvD;;;GAGG;AAEH;;;;;;;GAOG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;IAmBE,8BAA8B;IAC9B,gBADY,WAAW,EAKtB;IAvBD;;;OAGG;IACH,gBAAQ;IAER;;;OAGG;IACH,kBAAU;IAEV;;;OAGG;IACH,gBAAQ;IASR;;;;OAIG;IACH,mCAHoB,YAAY,kBAAkB,CAAC,KAAG,IAAI,GAC7C,SAAS,CAKrB;IAED;;;;OAIG;IACH,kCAHoB,YAAY,iBAAiB,CAAC,KAAG,IAAI,GAC5C,SAAS,CAKrB;IAED;;;;OAIG;IACH,yCAHoB,YAAY,wBAAwB,CAAC,KAAG,IAAI,GACnD,SAAS,CAKrB;IAED;;;;OAIG;IACH,+BAHoB,YAAY,cAAc,CAAC,KAAG,IAAI,GACzC,SAAS,CAKrB;IAED;;;;OAIG;IACH,yBAHoB,YAAY,MAAM,CAAC,KAAG,IAAI,GACjC,SAAS,CAKrB;IAED;;;;OAIG;IACH,6BAHoB,YAAY,YAAY,CAAC,KAAG,IAAI,GACvC,SAAS,CAKrB;IAED;;;;OAIG;IACH,6BAHoB,YAAY,YAAY,CAAC,KAAG,IAAI,GACvC,SAAS,CAKrB;IAED;;;;OAIG;IACH,+BAHoB,YAAY,cAAc,CAAC,KAAG,IAAI,GACzC,SAAS,CAKrB;IAED;;;;OAIG;IACH,mCAHoB,YAAY,kBAAkB,CAAC,KAAG,IAAI,GAC7C,SAAS,CAKrB;IAED;;;;OAIG;IACH,+BAHoB,YAAY,cAAc,CAAC,KAAG,IAAI,GACzC,SAAS,CAKrB;IAED;;;;OAIG;IACH,2BAHoB,YAAY,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;;;YACN,MAAM;;;;YACN,MAAM;;;mBAUN,MAAM;mBACN,MAAM;;;;;;;;;;;iBAQN,MAAM,EAAE;;;SAKR,MAAM;WACN,MAAM;UACN,MAAM;WACN,MAAM;eACN,MAAM;;;iBAKN,MAAM;;;;iBACN,MAAM;aACN,wBAAwB,EAAE;;;;;;YAK1B,MAAM;eACN,MAAM;;;;iBACN,UAAU;SACV,MAAM"} \ No newline at end of file +{"version":3,"file":"png.d.ts","sourceRoot":"","sources":["../../../image/parsers/png.js"],"names":[],"mappings":"gCAuBW,MAAM;;;;;;;;;;;;;;;;;;;2BAuBN,MAAM;;;;;;;;iCASN,MAAM;;;;;;;;;AA+GjB;;;;;GAKG;AAEH,uDAAuD;AAEvD;;;GAGG;AAEH;;;;;;;GAOG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;IAmBE,8BAA8B;IAC9B,gBADY,WAAW,EAKtB;IAvBD;;;OAGG;IACH,gBAAQ;IAER;;;OAGG;IACH,kBAAU;IAEV;;;OAGG;IACH,gBAAQ;IASR;;;;OAIG;IACH,mCAHoB,YAAY,kBAAkB,CAAC,KAAG,IAAI,GAC7C,SAAS,CAKrB;IAED;;;;OAIG;IACH,kCAHoB,YAAY,iBAAiB,CAAC,KAAG,IAAI,GAC5C,SAAS,CAKrB;IAED;;;;OAIG;IACH,yCAHoB,YAAY,wBAAwB,CAAC,KAAG,IAAI,GACnD,SAAS,CAKrB;IAED;;;;OAIG;IACH,+BAHoB,YAAY,cAAc,CAAC,KAAG,IAAI,GACzC,SAAS,CAKrB;IAED;;;;OAIG;IACH,yBAHoB,YAAY,MAAM,CAAC,KAAG,IAAI,GACjC,SAAS,CAKrB;IAED;;;;OAIG;IACH,6BAHoB,YAAY,YAAY,CAAC,KAAG,IAAI,GACvC,SAAS,CAKrB;IAED;;;;OAIG;IACH,6BAHoB,YAAY,YAAY,CAAC,KAAG,IAAI,GACvC,SAAS,CAKrB;IAED;;;;OAIG;IACH,+BAHoB,YAAY,cAA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MAAM;qBACN,UAAU;;;aAKV,MAAM;;;;qBACN,MAAM;;;;uBACN,MAAM;kBACN,MAAM;wBACN,MAAM;;;;UACN,UAAU;;;;;;gBAKV,MAAM;;;;UACN,MAAM;;;;YACN,MAAM;;;;WACN,MAAM;;;;mBACN,MAAM;;;;;;UAKN,MAAM;;;;WACN,MAAM;;;;SACN,MAAM;;;;UACN,MAAM;;;;YACN,MAAM;;;;YACN,MAAM;;;mBAUN,MAAM;mBACN,MAAM;;;;;;;;;;;iBAQN,MAAM,EAAE;;;SAKR,MAAM;WACN,MAAM;UACN,MAAM;WACN,MAAM;eACN,MAAM;;;iBAKN,MAAM;;;;iBACN,MAAM;aACN,wBAAwB,EAAE;;;;;;YAK1B,MAAM;eACN,MAAM;;;;iBACN,UAAU;SACV,MAAM"} \ No newline at end of file diff --git a/types/image/webp-shim/webp-shim.d.ts.map b/types/image/webp-shim/webp-shim.d.ts.map index 75b4874..37cf2f0 100644 --- a/types/image/webp-shim/webp-shim.d.ts.map +++ b/types/image/webp-shim/webp-shim.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"webp-shim.d.ts","sourceRoot":"","sources":["../../../image/webp-shim/webp-shim.js"],"names":[],"mappings":"AAgDA;;;GAGG;AACH,6CAHW,WAAW,GAAC,UAAU,GACpB,QAAQ,WAAW,CAAC,CAyBhC;AAED;;;GAGG;AACH,6CAHW,WAAW,GAAC,UAAU,GACpB,QAAQ,WAAW,CAAC,CAyBhC"} \ No newline at end of file +{"version":3,"file":"webp-shim.d.ts","sourceRoot":"","sources":["../../../image/webp-shim/webp-shim.js"],"names":[],"mappings":"AAkDA;;;GAGG;AACH,6CAHW,WAAW,GAAC,UAAU,GACpB,QAAQ,WAAW,CAAC,CAyBhC;AAED;;;GAGG;AACH,6CAHW,WAAW,GAAC,UAAU,GACpB,QAAQ,WAAW,CAAC,CAyBhC"} \ No newline at end of file diff --git a/types/index.d.ts b/types/index.d.ts index 307591d..e401c34 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -23,6 +23,7 @@ export type JpegStartOfFrame = import('./image/parsers/jpeg.js').JpegStartOfFram export type JpegStartOfScan = import('./image/parsers/jpeg.js').JpegStartOfScan; export type PngBackgroundColor = import('./image/parsers/png.js').PngBackgroundColor; export type PngChromaticies = import('./image/parsers/png.js').PngChromaticities; +export type PngColor = import('./image/parsers/png.js').PngColor; export type PngCompressedTextualData = import('./image/parsers/png.js').PngCompressedTextualData; export type PngHistogram = import('./image/parsers/png.js').PngHistogram; export type PngImageData = import('./image/parsers/png.js').PngImageData; @@ -34,12 +35,13 @@ export type PngPalette = import('./image/parsers/png.js').PngPalette; export type PngPhysicalPixelDimensions = import('./image/parsers/png.js').PngPhysicalPixelDimensions; export type PngSignificantBits = import('./image/parsers/png.js').PngSignificantBits; export type PngSuggestedPalette = import('./image/parsers/png.js').PngSuggestedPalette; +export type PngSuggestedPaletteEntry = import('./image/parsers/png.js').PngSuggestedPaletteEntry; export type PngTextualData = import('./image/parsers/png.js').PngTextualData; export type PngTransparency = import('./image/parsers/png.js').PngTransparency; export { UnarchiveEvent, UnarchiveEventType, UnarchiveInfoEvent, UnarchiveErrorEvent, UnarchiveStartEvent, UnarchiveFinishEvent, UnarchiveProgressEvent, UnarchiveExtractEvent, Unarchiver, Unzipper, Unrarrer, Untarrer, getUnarchiver } from "./archive/decompress.js"; export { getFullMIMEString, getShortMIMEString } from "./codecs/codecs.js"; export { GifParseEventType, GifParser } from "./image/parsers/gif.js"; export { JpegComponentType, JpegDctType, JpegDensityUnits, JpegExtensionThumbnailFormat, JpegHuffmanTableType, JpegParseEventType, JpegParser, JpegSegmentType } from "./image/parsers/jpeg.js"; -export { PngParseEventType, PngParser } from "./image/parsers/png.js"; +export { PngColorType, PngInterlaceMethod, PngParseEventType, PngParser, PngUnitSpecifier } from "./image/parsers/png.js"; export { convertWebPtoPNG, convertWebPtoJPG } from "./image/webp-shim/webp-shim.js"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/types/index.d.ts.map b/types/index.d.ts.map index b009770..5326334 100644 --- a/types/index.d.ts.map +++ b/types/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";;;;;0BAQc,OAAO,oBAAoB,EAAE,WAAW;0BACxC,OAAO,oBAAoB,EAAE,WAAW;wBACxC,OAAO,oBAAoB,EAAE,SAAS;sCAEtC,OAAO,wBAAwB,EAAE,uBAAuB;uBACxD,OAAO,wBAAwB,EAAE,QAAQ;kCACzC,OAAO,wBAAwB,EAAE,mBAAmB;yCACpD,OAAO,wBAAwB,EAAE,0BAA0B;wBAC3D,OAAO,wBAAwB,EAAE,SAAS;+BAC1C,OAAO,wBAAwB,EAAE,gBAAgB;oCACjD,OAAO,wBAAwB,EAAE,qBAAqB;iCACtD,OAAO,wBAAwB,EAAE,kBAAkB;gCAEnD,OAAO,yBAAyB,EAAE,iBAAiB;6BACnD,OAAO,yBAAyB,EAAE,cAAc;kCAChD,OAAO,yBAAyB,EAAE,mBAAmB;qCACrD,OAAO,yBAAyB,EAAE,sBAAsB;0CACxD,OAAO,yBAAyB,EAAE,2BAA2B;+BAC7D,OAAO,yBAAyB,EAAE,gBAAgB;8BAClD,OAAO,yBAAyB,EAAE,eAAe;iCAEjD,OAAO,wBAAwB,EAAE,kBAAkB;8BACnD,OAAO,wBAAwB,EAAE,iBAAiB;uCAClD,OAAO,wBAAwB,EAAE,wBAAwB;2BACzD,OAAO,wBAAwB,EAAE,YAAY;2BAC7C,OAAO,wBAAwB,EAAE,YAAY;4BAC7C,OAAO,wBAAwB,EAAE,aAAa;6BAC9C,OAAO,wBAAwB,EAAE,cAAc;iCAC/C,OAAO,wBAAwB,EAAE,kBAAkB;6BACnD,OAAO,wBAAwB,EAAE,cAAc;yBAC/C,OAAO,wBAAwB,EAAE,UAAU;yCAC3C,OAAO,wBAAwB,EAAE,0BAA0B;iCAC3D,OAAO,wBAAwB,EAAE,kBAAkB;kCACnD,OAAO,wBAAw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D,OAAO,wBAAwB,EAAE,kBAAkB;kCACnD,OAAO,wBAAwB,EAAE,mBAAmB;uCACpD,OAAO,wBAAwB,EAAE,wBAAwB;6BACzD,OAAO,wBAAwB,EAAE,cAAc;8BAC/C,OAAO,wBAAwB,EAAE,eAAe"} \ No newline at end of file diff --git a/types/io/bitbuffer.d.ts.map b/types/io/bitbuffer.d.ts.map index 9f13000..cf8d0d0 100644 --- a/types/io/bitbuffer.d.ts.map +++ b/types/io/bitbuffer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"bitbuffer.d.ts","sourceRoot":"","sources":["../../io/bitbuffer.js"],"names":[],"mappings":"AAuBA;;GAEG;AACH;IACE;;;;OAIG;IACH,sBAJW,MAAM,QACN,OAAO,EAoCjB;IA5BC;;;OAGG;IACH,aAHU,UAAU,CAGgB;IAEpC;;;;;OAKG;IACH,YAAc;IAEd;;;;OAIG;IACH,gBAHU,MAAM,CAGA;IAEhB;;;;;OAKG;IACH,eAHU,MAAM,CAGc;IAGhC,yBAAyB;IACzB,uBADc,OAAO,CAGpB;IAED;;;;;;OAMG;IACH,yCAkBC;IAED;;;;;;OAMG;IACH,eAJW,MAAM,WACN,MAAM,QA4FhB;CACF"} \ No newline at end of file +{"version":3,"file":"bitbuffer.d.ts","sourceRoot":"","sources":["../../io/bitbuffer.js"],"names":[],"mappings":"AAuBA;;GAEG;AACH;IACE;;;;OAIG;IACH,sBAJW,MAAM,QACN,OAAO,EAoCjB;IA5BC;;;OAGG;IACH,aAHU,UAAU,CAGgB;IAEpC;;;;;OAKG;IACH,YAAc;IAEd;;;;OAIG;IACH,gBAHU,MAAM,CAGA;IAEhB;;;;;OAKG;IACH,eAHU,MAAM,CAGc;IAKhC,yBAAyB;IACzB,uBADc,OAAO,CAGpB;IAED;;;;;;OAMG;IACH,yCAkBC;IAED;;;;;;OAMG;IACH,eAJW,MAAM,WACN,MAAM,QA4FhB;CACF"} \ No newline at end of file diff --git a/types/io/bitstream.d.ts b/types/io/bitstream.d.ts index f130cb2..7e77a0f 100644 --- a/types/io/bitstream.d.ts +++ b/types/io/bitstream.d.ts @@ -121,5 +121,12 @@ export class BitStream { * @returns {Uint8Array} The subarray. */ readBytes(n: number): Uint8Array; + /** + * Skips n bits in the stream. Will throw an error if n is < 0 or greater than the number of + * bits left in the stream. + * @param {number} n The number of bits to skip. Must be a positive integer. + * @returns {BitStream} Returns this BitStream for chaining. + */ + skip(n: number): BitStream; } //# sourceMappingURL=bitstream.d.ts.map \ No newline at end of file diff --git a/types/io/bitstream.d.ts.map b/types/io/bitstream.d.ts.map index 3f4f525..c8f9e71 100644 --- a/types/io/bitstream.d.ts.map +++ b/types/io/bitstream.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"bitstream.d.ts","sourceRoot":"","sources":["../../io/bitstream.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH;IACE;;;;;;;OAOG;IACH,gBAPW,WAAW,OACX,OAAO,0CA2CjB;IA7BC;;;;OAIG;IACH,cAA+C;IAE/C;;;;OAIG;IACH,gBAAgB;IAEhB;;;;OAIG;IACH,eAAe;IAEf;;;;OAIG;IACH,kBAAkB;IAElB,cAoFS,MAAM,4BAEJ,MAAM,CAtF0C;IAG7D;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,kBAFa,MAAM,CAKlB;IAED;;;;;;;;;OASG;IACH,gBAJW,MAAM,0BAEJ,MAAM,CAgDlB;IAED;;;;;;;;;OASG;IACH,gBAJW,MAAM,0BAEJ,MAAM,CA8ClB;IAED;;;;;;OAMG;IACH,WAFa,MAAM,CAMlB;IAED;;;;OAIG;IACH,YAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;;;;OAOG;IACH,aAJW,MAAM,0BAEJ,UAAU,CAiDtB;IAED;;;OAGG;IACH,aAHW,MAAM,GACJ,UAAU,CAItB;CACF"} \ No newline at end of file +{"version":3,"file":"bitstream.d.ts","sourceRoot":"","sources":["../../io/bitstream.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH;IACE;;;;;;;OAOG;IACH,gBAPW,WAAW,OACX,OAAO,0CA2CjB;IA7BC;;;;OAIG;IACH,cAA+C;IAE/C;;;;OAIG;IACH,gBAAgB;IAEhB;;;;OAIG;IACH,eAAe;IAEf;;;;OAIG;IACH,kBAAkB;IAElB,cAsFS,MAAM,4BAEJ,MAAM,CAxF0C;IAG7D;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,kBAFa,MAAM,CAKlB;IAED;;;;;;;;;OASG;IACH,gBAJW,MAAM,0BAEJ,MAAM,CAkDlB;IAED;;;;;;;;;OASG;IACH,gBAJW,MAAM,0BAEJ,MAAM,CAgDlB;IAED;;;;;;OAMG;IACH,WAFa,MAAM,CAMlB;IAED;;;;OAIG;IACH,YAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;;;;OAOG;IACH,aAJW,MAAM,0BAEJ,UAAU,CAiDtB;IAED;;;OAGG;IACH,aAHW,MAAM,GACJ,UAAU,CAItB;IAED;;;;;OAKG;IACH,QAHW,MAAM,GACJ,SAAS,CAoBrB;CACF"} \ No newline at end of file diff --git a/types/io/bytebuffer.d.ts.map b/types/io/bytebuffer.d.ts.map index 8990226..f9f7ef1 100644 --- a/types/io/bytebuffer.d.ts.map +++ b/types/io/bytebuffer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"bytebuffer.d.ts","sourceRoot":"","sources":["../../io/bytebuffer.js"],"names":[],"mappings":"AAWA;;GAEG;AACH;IACE;;OAEG;IACH,sBAFW,MAAM,EAkBhB;IAXC;;;OAGG;IACH,aAHU,UAAU,CAGgB;IAEpC;;;OAGG;IACH,YAHU,MAAM,CAGJ;IAId;;OAEG;IACH,cAFW,MAAM,QAKhB;IAED;;OAEG;IACH,mBAFW,MAAO,MAAM,CAAC,GAAC,UAAU,GAAC,SAAS,QAM7C;IAED;;;;;OAKG;IACH,iBAHW,MAAM,YACN,MAAM,QAuBhB;IAED;;;;;OAKG;IACH,uBAHW,MAAM,YACN,MAAM,QAqBhB;IAED;;OAEG;IACH,sBAFW,MAAM,QAUhB;CACF"} \ No newline at end of file +{"version":3,"file":"bytebuffer.d.ts","sourceRoot":"","sources":["../../io/bytebuffer.js"],"names":[],"mappings":"AAaA;;GAEG;AACH;IACE;;OAEG;IACH,sBAFW,MAAM,EAkBhB;IAXC;;;OAGG;IACH,aAHU,UAAU,CAGgB;IAEpC;;;OAGG;IACH,YAHU,MAAM,CAGJ;IAId;;OAEG;IACH,cAFW,MAAM,QAKhB;IAED;;OAEG;IACH,mBAFW,MAAO,MAAM,CAAC,GAAC,UAAU,GAAC,SAAS,QAM7C;IAED;;;;;OAKG;IACH,iBAHW,MAAM,YACN,MAAM,QAuBhB;IAED;;;;;OAKG;IACH,uBAHW,MAAM,YACN,MAAM,QAqBhB;IAED;;OAEG;IACH,sBAFW,MAAM,QAUhB;CACF"} \ No newline at end of file diff --git a/types/io/bytestream.d.ts b/types/io/bytestream.d.ts index a9a93fb..188083b 100644 --- a/types/io/bytestream.d.ts +++ b/types/io/bytestream.d.ts @@ -55,7 +55,7 @@ export class ByteStream { */ setLittleEndian(val?: boolean | undefined): void; /** - * Returns how many bytes have been read in the stream since the beginning of time. + * Returns how many bytes have been consumed (read or skipped) since the beginning of time. * @returns {number} */ getNumBytesRead(): number;