document-bytes 1.6.3 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -64,6 +64,120 @@ interface InflateResult {
64
64
  }
65
65
  declare function inflateTolerant(data: Uint8Array<ArrayBuffer>): InflateResult;
66
66
  //#endregion
67
+ //#region src/text/legacy-single-byte-tables.d.ts
68
+ /** A legacy single-byte encoding {@link decodeText} can decode when the caller declares it explicitly. Never produced by detection: nothing distinguishes one of these code pages from another, or from windows-1252, without the statistical model this module does not carry (see {@link TextEncodingLabel}). */
69
+ type LegacySingleByteEncodingLabel = "ibm866" | "iso-8859-2" | "iso-8859-3" | "iso-8859-4" | "iso-8859-5" | "iso-8859-6" | "iso-8859-7" | "iso-8859-8" | "iso-8859-8-i" | "iso-8859-10" | "iso-8859-13" | "iso-8859-14" | "iso-8859-15" | "iso-8859-16" | "koi8-r" | "koi8-u" | "macintosh" | "windows-874" | "windows-1250" | "windows-1251" | "windows-1253" | "windows-1254" | "windows-1255" | "windows-1256" | "windows-1257" | "windows-1258" | "x-mac-cyrillic";
70
+ //#endregion
71
+ //#region src/text/decode.d.ts
72
+ /**
73
+ * The character encodings {@link decodeText} can produce text from.
74
+ *
75
+ * Detection stays deliberately bounded to `"utf-8"`, `"utf-16le"`, `"utf-16be"`, `"utf-32le"`, `"utf-32be"` and `"windows-1252"`: each of those is either self-identifying through a byte order mark, structurally checkable through its own validity rules, or guessable behind a stated plausibility test, and nothing distinguishes one legacy code page from another, or from windows-1252, without the statistical model this module does not carry. Bytes that look like an undetected legacy encoding are refused rather than guessed at.
76
+ *
77
+ * {@link DecodeTextOptions.encoding} can name more than detection can reach, though: every {@link LegacySingleByteEncodingLabel} the WHATWG Encoding Standard defines is also accepted, for a caller who already knows their file's code page rather than asking this module to guess it (ExaDev/documents.js#1361). Legacy multi-byte and double-byte CJK encodings (Shift_JIS, EUC-JP, ISO-2022-JP, GBK, gb18030, Big5, EUC-KR) remain outside what either detection or a declared `encoding` can reach; see legacy-single-byte-tables.ts for why that is a different kind of change, tracked separately as ExaDev/documents.js#1388.
78
+ */
79
+ type TextEncodingLabel = "utf-8" | "utf-16le" | "utf-16be" | "utf-32le" | "utf-32be" | "windows-1252" | LegacySingleByteEncodingLabel;
80
+ /**
81
+ * How {@link decodeText} arrived at the encoding it used.
82
+ *
83
+ * `declared` is the caller's own `encoding` option, `bom` a byte order mark, `utf8` a successful decode under UTF-8's own validity rules with nothing declaring it, and `detected` a guess from one of the plausibility tests.
84
+ */
85
+ type DecodedTextSource = "declared" | "bom" | "utf8" | "detected";
86
+ /**
87
+ * How far the reported encoding can be relied on.
88
+ *
89
+ * `certain`: the bytes settle it, or the caller declared it. A byte order mark identifies its encoding unambiguously, and bytes entirely below 0x80 decode to the same text under every encoding in the supported set. `high`: the bytes satisfy UTF-8's multi-byte validity rules, which text in a single-byte code page essentially never does by accident. `low`: a guess from a plausibility test. Show the encoding to whoever supplied the bytes and let them override it.
90
+ */
91
+ type DecodedTextConfidence = "certain" | "high" | "low";
92
+ /** What {@link decodeText} produced, and how far its own account of the encoding can be trusted. */
93
+ interface DecodedText {
94
+ /** The decoded text, with any byte order mark removed rather than left as a leading U+FEFF. */
95
+ readonly text: string;
96
+ /** The encoding the bytes were decoded under. */
97
+ readonly encoding: TextEncodingLabel;
98
+ /** What settled that encoding. */
99
+ readonly source: DecodedTextSource;
100
+ /** How far {@link DecodedText.encoding} can be relied on. */
101
+ readonly confidence: DecodedTextConfidence;
102
+ /** One entry per reason the caller should look at the result before trusting it, and empty whenever the confidence is `certain` or `high`. */
103
+ readonly warnings: readonly string[];
104
+ }
105
+ /** Options for {@link decodeText} and {@link tryDecodeText}. */
106
+ interface DecodeTextOptions {
107
+ /** The encoding to decode under, skipping detection entirely. A byte order mark for this same encoding is still removed, so the option can be given for bytes that carry one. */
108
+ readonly encoding?: TextEncodingLabel;
109
+ }
110
+ /** Why {@link UndecodableTextError} was thrown: `binary` for bytes no text encoding could hold, `malformed` for bytes that contradict the encoding a mark or the caller named, and `unrecognised` for text-shaped bytes matching none of the supported encodings. */
111
+ type UndecodableTextReason = "binary" | "malformed" | "unrecognised";
112
+ /** Thrown when bytes cannot be turned into text: they are not text at all, they contradict a declared or marked encoding, or they match none of the supported encodings. */
113
+ declare class UndecodableTextError extends Error {
114
+ /** Which of the three failures this was, for a caller that treats them differently. */
115
+ readonly reason: UndecodableTextReason;
116
+ constructor(reason: UndecodableTextReason, message: string);
117
+ }
118
+ /**
119
+ * Code units converted by one `String.fromCharCode.apply` call. JavaScriptCore rejects a call with more than 65536 arguments, a limit MDN documents as hard-coded (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply), and other engines bound the same thing by stack size, so this is half that stated figure, leaving the engine room for whatever else it puts on its argument stack. The same quantum src/bytes/base64.ts's own chunked encode uses, for the same reason: appending one character at a time to a string is what made converting a few megabytes take seconds under instrumentation.
120
+ *
121
+ * Exported so tests can place inputs on and around a chunk boundary without repeating the figure.
122
+ */
123
+ declare const TEXT_DECODE_CHUNK_CODE_UNITS: number;
124
+ /** A byte order mark's own encoding, and how many leading bytes it occupies. */
125
+ interface ByteOrderMark {
126
+ /** The encoding the mark identifies. */
127
+ readonly encoding: TextEncodingLabel;
128
+ /** The mark's own length in bytes, ahead of whatever it precedes. */
129
+ readonly length: number;
130
+ }
131
+ /**
132
+ * Detects a byte order mark at the start of `bytes`, without decoding anything past it.
133
+ *
134
+ * {@link decodeText} already checks for a mark as part of its own detection order; this exists for a caller that has to settle the encoding before it can safely read anything else, an XML document's own encoding declaration being the case that occurs: the declaration lives inside the document, in whichever encoding the document turns out to be, so a mark has to be ruled out (or read) before that declaration can even be located.
135
+ * @param bytes - The bytes to check.
136
+ * @returns The mark's encoding and length, or `undefined` when the bytes carry none of the five marks {@link decodeText} itself recognises.
137
+ */
138
+ declare function detectByteOrderMark(bytes: Uint8Array): ByteOrderMark | undefined;
139
+ /**
140
+ * Whether bytes can hold text at all, judged without reference to which encoding they might be in.
141
+ *
142
+ * A NUL byte belongs to no text document format, and outside NUL the only C0 control bytes text carries are tab, line feed, form feed and carriage return, so a density of any others says binary. {@link decodeText} asks this before it guesses at windows-1252, which maps nearly every byte to some character and would otherwise read a PNG as a page of mojibake rather than refusing it.
143
+ *
144
+ * UTF-16 is the one text encoding this returns `false` for, since it interleaves NUL bytes by design. {@link decodeText} settles UTF-16 from a byte order mark or that same interleave before it reaches this check, and applies the identical rule to the characters a mark-less UTF-16 guess produced, so that guess cannot smuggle binary past this one.
145
+ * @param bytes - The bytes to judge.
146
+ * @returns Whether the bytes carry no NUL and few enough other C0 control bytes to be text.
147
+ */
148
+ declare function isProbablyText(bytes: Uint8Array): boolean;
149
+ /**
150
+ * Decodes bytes to text, working out which character encoding they hold.
151
+ *
152
+ * The encoding is settled in a fixed order: the `encoding` option if the caller gave one, then a byte order mark, then the NUL interleave UTF-16 leaves when it holds Latin-script text and carries no mark, then UTF-8 if the bytes satisfy its own validity rules, then windows-1252 if the bytes read as Western text. Anything a byte order mark or the caller names is decoded under that encoding alone and fails if the bytes contradict it. Everything reached by detection reports how it was reached, so a caller can show the encoding, and a guess additionally carries a warning and a `low` confidence rather than being presented as fact.
153
+ *
154
+ * Bytes that are not text (a NUL byte, or a density of other C0 control bytes) are refused before any guess is made, so detection never widens what counts as text. The readings whose bytes carry NULs legitimately, mark-less UTF-16 and anything behind a UTF-16 or UTF-32 byte order mark, are judged by the same rule applied to the characters they produced instead. Only an explicit `encoding` from the caller skips the judgement entirely, since that is the caller overriding detection outright. A byte order mark is removed from the result rather than left as a leading U+FEFF.
155
+ * @param bytes - The bytes to decode.
156
+ * @param options - An explicit `encoding` to decode under, skipping detection.
157
+ * @throws UndecodableTextError When the bytes are not text, contradict a declared or marked encoding, or match none of the supported encodings.
158
+ * @returns The text, the encoding it was decoded under, and how far that account of the encoding can be relied on.
159
+ */
160
+ declare function decodeText(bytes: Uint8Array, options?: DecodeTextOptions): DecodedText;
161
+ /**
162
+ * {@link decodeText}, returning `undefined` where it would throw.
163
+ *
164
+ * For a caller asking whether bytes are decodable at all, a schema refinement being the case this exists for, where an exception would be control flow rather than an error.
165
+ * @param bytes - The bytes to decode.
166
+ * @param options - An explicit `encoding` to decode under, skipping detection.
167
+ * @returns What {@link decodeText} would return, or `undefined` where it would throw.
168
+ */
169
+ declare function tryDecodeText(bytes: Uint8Array, options?: DecodeTextOptions): DecodedText | undefined;
170
+ //#endregion
171
+ //#region src/text/labels.d.ts
172
+ /**
173
+ * Resolves the name a document gives its own encoding to one {@link decodeText} can decode under.
174
+ *
175
+ * Matching follows the Encoding Standard: the name is stripped of leading and trailing ASCII whitespace and lowercased before lookup, so " UTF-8 " and "utf-8" are the same label. A name decodeText cannot decode, a legacy multi-byte encoding or something unrecognised entirely, resolves to `undefined` rather than to an approximation.
176
+ * @param label - The declared encoding name, however the document spelled it.
177
+ * @returns The encoding to decode under, or `undefined` when the name names nothing decodeText decodes.
178
+ */
179
+ declare function resolveEncodingLabel(label: string): TextEncodingLabel | undefined;
180
+ //#endregion
67
181
  //#region src/image/png-decode.d.ts
68
182
  interface RawImage {
69
183
  readonly width: number;
@@ -102,4 +216,4 @@ interface JpegInfo {
102
216
  }
103
217
  declare function readJpegInfo(bytes: Uint8Array<ArrayBuffer>): JpegInfo;
104
218
  //#endregion
105
- export { BASE64_ENCODE_CHUNK_CHARS, ByteReader, ByteWriter, DeflateLevel, InflateResult, JpegInfo, MAX_INFLATE_OUTPUT_BYTES, PNG_MAX_DIMENSION, PNG_MAX_PIXELS, PngDecodeOptions, PngEncodeOptions, PngFilterType, RawImage, base64ToBytes, bytesToBase64, concatBytes, crc32, decodePng, deflate, encodePng, exceedsMaxPixelCount, filterScanlines, inflate, inflateTolerant, isAsciiWhitespace, readJpegInfo, unfilterScanlines };
219
+ export { BASE64_ENCODE_CHUNK_CHARS, ByteOrderMark, ByteReader, ByteWriter, DecodeTextOptions, DecodedText, DecodedTextConfidence, DecodedTextSource, DeflateLevel, InflateResult, JpegInfo, MAX_INFLATE_OUTPUT_BYTES, PNG_MAX_DIMENSION, PNG_MAX_PIXELS, PngDecodeOptions, PngEncodeOptions, PngFilterType, RawImage, TEXT_DECODE_CHUNK_CODE_UNITS, TextEncodingLabel, UndecodableTextError, UndecodableTextReason, base64ToBytes, bytesToBase64, concatBytes, crc32, decodePng, decodeText, deflate, detectByteOrderMark, encodePng, exceedsMaxPixelCount, filterScanlines, inflate, inflateTolerant, isAsciiWhitespace, isProbablyText, readJpegInfo, resolveEncodingLabel, tryDecodeText, unfilterScanlines };
package/dist/index.d.ts CHANGED
@@ -64,6 +64,120 @@ interface InflateResult {
64
64
  }
65
65
  declare function inflateTolerant(data: Uint8Array<ArrayBuffer>): InflateResult;
66
66
  //#endregion
67
+ //#region src/text/legacy-single-byte-tables.d.ts
68
+ /** A legacy single-byte encoding {@link decodeText} can decode when the caller declares it explicitly. Never produced by detection: nothing distinguishes one of these code pages from another, or from windows-1252, without the statistical model this module does not carry (see {@link TextEncodingLabel}). */
69
+ type LegacySingleByteEncodingLabel = "ibm866" | "iso-8859-2" | "iso-8859-3" | "iso-8859-4" | "iso-8859-5" | "iso-8859-6" | "iso-8859-7" | "iso-8859-8" | "iso-8859-8-i" | "iso-8859-10" | "iso-8859-13" | "iso-8859-14" | "iso-8859-15" | "iso-8859-16" | "koi8-r" | "koi8-u" | "macintosh" | "windows-874" | "windows-1250" | "windows-1251" | "windows-1253" | "windows-1254" | "windows-1255" | "windows-1256" | "windows-1257" | "windows-1258" | "x-mac-cyrillic";
70
+ //#endregion
71
+ //#region src/text/decode.d.ts
72
+ /**
73
+ * The character encodings {@link decodeText} can produce text from.
74
+ *
75
+ * Detection stays deliberately bounded to `"utf-8"`, `"utf-16le"`, `"utf-16be"`, `"utf-32le"`, `"utf-32be"` and `"windows-1252"`: each of those is either self-identifying through a byte order mark, structurally checkable through its own validity rules, or guessable behind a stated plausibility test, and nothing distinguishes one legacy code page from another, or from windows-1252, without the statistical model this module does not carry. Bytes that look like an undetected legacy encoding are refused rather than guessed at.
76
+ *
77
+ * {@link DecodeTextOptions.encoding} can name more than detection can reach, though: every {@link LegacySingleByteEncodingLabel} the WHATWG Encoding Standard defines is also accepted, for a caller who already knows their file's code page rather than asking this module to guess it (ExaDev/documents.js#1361). Legacy multi-byte and double-byte CJK encodings (Shift_JIS, EUC-JP, ISO-2022-JP, GBK, gb18030, Big5, EUC-KR) remain outside what either detection or a declared `encoding` can reach; see legacy-single-byte-tables.ts for why that is a different kind of change, tracked separately as ExaDev/documents.js#1388.
78
+ */
79
+ type TextEncodingLabel = "utf-8" | "utf-16le" | "utf-16be" | "utf-32le" | "utf-32be" | "windows-1252" | LegacySingleByteEncodingLabel;
80
+ /**
81
+ * How {@link decodeText} arrived at the encoding it used.
82
+ *
83
+ * `declared` is the caller's own `encoding` option, `bom` a byte order mark, `utf8` a successful decode under UTF-8's own validity rules with nothing declaring it, and `detected` a guess from one of the plausibility tests.
84
+ */
85
+ type DecodedTextSource = "declared" | "bom" | "utf8" | "detected";
86
+ /**
87
+ * How far the reported encoding can be relied on.
88
+ *
89
+ * `certain`: the bytes settle it, or the caller declared it. A byte order mark identifies its encoding unambiguously, and bytes entirely below 0x80 decode to the same text under every encoding in the supported set. `high`: the bytes satisfy UTF-8's multi-byte validity rules, which text in a single-byte code page essentially never does by accident. `low`: a guess from a plausibility test. Show the encoding to whoever supplied the bytes and let them override it.
90
+ */
91
+ type DecodedTextConfidence = "certain" | "high" | "low";
92
+ /** What {@link decodeText} produced, and how far its own account of the encoding can be trusted. */
93
+ interface DecodedText {
94
+ /** The decoded text, with any byte order mark removed rather than left as a leading U+FEFF. */
95
+ readonly text: string;
96
+ /** The encoding the bytes were decoded under. */
97
+ readonly encoding: TextEncodingLabel;
98
+ /** What settled that encoding. */
99
+ readonly source: DecodedTextSource;
100
+ /** How far {@link DecodedText.encoding} can be relied on. */
101
+ readonly confidence: DecodedTextConfidence;
102
+ /** One entry per reason the caller should look at the result before trusting it, and empty whenever the confidence is `certain` or `high`. */
103
+ readonly warnings: readonly string[];
104
+ }
105
+ /** Options for {@link decodeText} and {@link tryDecodeText}. */
106
+ interface DecodeTextOptions {
107
+ /** The encoding to decode under, skipping detection entirely. A byte order mark for this same encoding is still removed, so the option can be given for bytes that carry one. */
108
+ readonly encoding?: TextEncodingLabel;
109
+ }
110
+ /** Why {@link UndecodableTextError} was thrown: `binary` for bytes no text encoding could hold, `malformed` for bytes that contradict the encoding a mark or the caller named, and `unrecognised` for text-shaped bytes matching none of the supported encodings. */
111
+ type UndecodableTextReason = "binary" | "malformed" | "unrecognised";
112
+ /** Thrown when bytes cannot be turned into text: they are not text at all, they contradict a declared or marked encoding, or they match none of the supported encodings. */
113
+ declare class UndecodableTextError extends Error {
114
+ /** Which of the three failures this was, for a caller that treats them differently. */
115
+ readonly reason: UndecodableTextReason;
116
+ constructor(reason: UndecodableTextReason, message: string);
117
+ }
118
+ /**
119
+ * Code units converted by one `String.fromCharCode.apply` call. JavaScriptCore rejects a call with more than 65536 arguments, a limit MDN documents as hard-coded (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply), and other engines bound the same thing by stack size, so this is half that stated figure, leaving the engine room for whatever else it puts on its argument stack. The same quantum src/bytes/base64.ts's own chunked encode uses, for the same reason: appending one character at a time to a string is what made converting a few megabytes take seconds under instrumentation.
120
+ *
121
+ * Exported so tests can place inputs on and around a chunk boundary without repeating the figure.
122
+ */
123
+ declare const TEXT_DECODE_CHUNK_CODE_UNITS: number;
124
+ /** A byte order mark's own encoding, and how many leading bytes it occupies. */
125
+ interface ByteOrderMark {
126
+ /** The encoding the mark identifies. */
127
+ readonly encoding: TextEncodingLabel;
128
+ /** The mark's own length in bytes, ahead of whatever it precedes. */
129
+ readonly length: number;
130
+ }
131
+ /**
132
+ * Detects a byte order mark at the start of `bytes`, without decoding anything past it.
133
+ *
134
+ * {@link decodeText} already checks for a mark as part of its own detection order; this exists for a caller that has to settle the encoding before it can safely read anything else, an XML document's own encoding declaration being the case that occurs: the declaration lives inside the document, in whichever encoding the document turns out to be, so a mark has to be ruled out (or read) before that declaration can even be located.
135
+ * @param bytes - The bytes to check.
136
+ * @returns The mark's encoding and length, or `undefined` when the bytes carry none of the five marks {@link decodeText} itself recognises.
137
+ */
138
+ declare function detectByteOrderMark(bytes: Uint8Array): ByteOrderMark | undefined;
139
+ /**
140
+ * Whether bytes can hold text at all, judged without reference to which encoding they might be in.
141
+ *
142
+ * A NUL byte belongs to no text document format, and outside NUL the only C0 control bytes text carries are tab, line feed, form feed and carriage return, so a density of any others says binary. {@link decodeText} asks this before it guesses at windows-1252, which maps nearly every byte to some character and would otherwise read a PNG as a page of mojibake rather than refusing it.
143
+ *
144
+ * UTF-16 is the one text encoding this returns `false` for, since it interleaves NUL bytes by design. {@link decodeText} settles UTF-16 from a byte order mark or that same interleave before it reaches this check, and applies the identical rule to the characters a mark-less UTF-16 guess produced, so that guess cannot smuggle binary past this one.
145
+ * @param bytes - The bytes to judge.
146
+ * @returns Whether the bytes carry no NUL and few enough other C0 control bytes to be text.
147
+ */
148
+ declare function isProbablyText(bytes: Uint8Array): boolean;
149
+ /**
150
+ * Decodes bytes to text, working out which character encoding they hold.
151
+ *
152
+ * The encoding is settled in a fixed order: the `encoding` option if the caller gave one, then a byte order mark, then the NUL interleave UTF-16 leaves when it holds Latin-script text and carries no mark, then UTF-8 if the bytes satisfy its own validity rules, then windows-1252 if the bytes read as Western text. Anything a byte order mark or the caller names is decoded under that encoding alone and fails if the bytes contradict it. Everything reached by detection reports how it was reached, so a caller can show the encoding, and a guess additionally carries a warning and a `low` confidence rather than being presented as fact.
153
+ *
154
+ * Bytes that are not text (a NUL byte, or a density of other C0 control bytes) are refused before any guess is made, so detection never widens what counts as text. The readings whose bytes carry NULs legitimately, mark-less UTF-16 and anything behind a UTF-16 or UTF-32 byte order mark, are judged by the same rule applied to the characters they produced instead. Only an explicit `encoding` from the caller skips the judgement entirely, since that is the caller overriding detection outright. A byte order mark is removed from the result rather than left as a leading U+FEFF.
155
+ * @param bytes - The bytes to decode.
156
+ * @param options - An explicit `encoding` to decode under, skipping detection.
157
+ * @throws UndecodableTextError When the bytes are not text, contradict a declared or marked encoding, or match none of the supported encodings.
158
+ * @returns The text, the encoding it was decoded under, and how far that account of the encoding can be relied on.
159
+ */
160
+ declare function decodeText(bytes: Uint8Array, options?: DecodeTextOptions): DecodedText;
161
+ /**
162
+ * {@link decodeText}, returning `undefined` where it would throw.
163
+ *
164
+ * For a caller asking whether bytes are decodable at all, a schema refinement being the case this exists for, where an exception would be control flow rather than an error.
165
+ * @param bytes - The bytes to decode.
166
+ * @param options - An explicit `encoding` to decode under, skipping detection.
167
+ * @returns What {@link decodeText} would return, or `undefined` where it would throw.
168
+ */
169
+ declare function tryDecodeText(bytes: Uint8Array, options?: DecodeTextOptions): DecodedText | undefined;
170
+ //#endregion
171
+ //#region src/text/labels.d.ts
172
+ /**
173
+ * Resolves the name a document gives its own encoding to one {@link decodeText} can decode under.
174
+ *
175
+ * Matching follows the Encoding Standard: the name is stripped of leading and trailing ASCII whitespace and lowercased before lookup, so " UTF-8 " and "utf-8" are the same label. A name decodeText cannot decode, a legacy multi-byte encoding or something unrecognised entirely, resolves to `undefined` rather than to an approximation.
176
+ * @param label - The declared encoding name, however the document spelled it.
177
+ * @returns The encoding to decode under, or `undefined` when the name names nothing decodeText decodes.
178
+ */
179
+ declare function resolveEncodingLabel(label: string): TextEncodingLabel | undefined;
180
+ //#endregion
67
181
  //#region src/image/png-decode.d.ts
68
182
  interface RawImage {
69
183
  readonly width: number;
@@ -102,4 +216,4 @@ interface JpegInfo {
102
216
  }
103
217
  declare function readJpegInfo(bytes: Uint8Array<ArrayBuffer>): JpegInfo;
104
218
  //#endregion
105
- export { BASE64_ENCODE_CHUNK_CHARS, ByteReader, ByteWriter, DeflateLevel, InflateResult, JpegInfo, MAX_INFLATE_OUTPUT_BYTES, PNG_MAX_DIMENSION, PNG_MAX_PIXELS, PngDecodeOptions, PngEncodeOptions, PngFilterType, RawImage, base64ToBytes, bytesToBase64, concatBytes, crc32, decodePng, deflate, encodePng, exceedsMaxPixelCount, filterScanlines, inflate, inflateTolerant, isAsciiWhitespace, readJpegInfo, unfilterScanlines };
219
+ export { BASE64_ENCODE_CHUNK_CHARS, ByteOrderMark, ByteReader, ByteWriter, DecodeTextOptions, DecodedText, DecodedTextConfidence, DecodedTextSource, DeflateLevel, InflateResult, JpegInfo, MAX_INFLATE_OUTPUT_BYTES, PNG_MAX_DIMENSION, PNG_MAX_PIXELS, PngDecodeOptions, PngEncodeOptions, PngFilterType, RawImage, TEXT_DECODE_CHUNK_CODE_UNITS, TextEncodingLabel, UndecodableTextError, UndecodableTextReason, base64ToBytes, bytesToBase64, concatBytes, crc32, decodePng, decodeText, deflate, detectByteOrderMark, encodePng, exceedsMaxPixelCount, filterScanlines, inflate, inflateTolerant, isAsciiWhitespace, isProbablyText, readJpegInfo, resolveEncodingLabel, tryDecodeText, unfilterScanlines };