@flighthq/types 0.3.1-next.948.85d9f30 → 0.3.1-next.970.9691e7b

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.
@@ -1,4 +1,9 @@
1
- export type Decompressor = (compressed: Readonly<Uint8Array>, uncompressedLength: number) => Uint8Array | null;
1
+ export type Decompressor = (compressed: Readonly<Uint8Array>, uncompressedLength: number, framing: CompressionFraming) => Uint8Array | null;
2
+ export declare const CompressionFraming: {
3
+ readonly Raw: "Raw";
4
+ readonly Rfc1950: "Rfc1950";
5
+ };
6
+ export type CompressionFraming = (typeof CompressionFraming)[keyof typeof CompressionFraming];
2
7
  export declare const Compression: {
3
8
  readonly Brotli: "brotli";
4
9
  readonly Deflate: "deflate";
@@ -1 +1 @@
1
- {"version":3,"file":"Compression.d.ts","sourceRoot":"","sources":["../src/Compression.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,EAAE,MAAM,KAAK,UAAU,GAAG,IAAI,CAAC;AAM/G,eAAO,MAAM,WAAW;;;;CAQd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"Compression.d.ts","sourceRoot":"","sources":["../src/Compression.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,YAAY,GAAG,CACzB,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,EAChC,kBAAkB,EAAE,MAAM,EAC1B,OAAO,EAAE,kBAAkB,KACxB,UAAU,GAAG,IAAI,CAAC;AAKvB,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAM9F,eAAO,MAAM,WAAW;;;;CAQd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC"}
@@ -1,7 +1,14 @@
1
+ // Whether the bytes are the compression algorithm's raw stream or use RFC 1950's zlib framing. The
2
+ // framing is independent of the algorithm registry key: LZMA and Brotli use Raw, while DEFLATE is carried
3
+ // both ways by existing containers.
4
+ export const CompressionFraming = {
5
+ Raw: 'Raw',
6
+ Rfc1950: 'Rfc1950',
7
+ };
1
8
  // The compression algorithms a container can carry, named by algorithm rather than by any one format's
2
9
  // signature or method byte, because a caller registers an implementation it has rather than a code it
3
- // read. `Deflate` covers both the raw RFC 1951 stream and the RFC 1950 zlib wrapper around it, which is
4
- // the pair every real container mixes.
10
+ // read. Framing is supplied separately at each decode call, so one `Deflate` registration still serves
11
+ // both raw RFC 1951 streams and RFC 1950 zlib wrappers without guessing between them.
5
12
  export const Compression = {
6
13
  // No Brotli implementation ships with Flight, deliberately. The decoder needs a large static
7
14
  // dictionary that is data rather than rules, so a caller registers a decompressor they already have —
@@ -1 +1 @@
1
- {"version":3,"file":"Compression.js","sourceRoot":"","sources":["../src/Compression.ts"],"names":[],"mappings":"AASA,uGAAuG;AACvG,sGAAsG;AACtG,wGAAwG;AACxG,uCAAuC;AACvC,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,6FAA6F;IAC7F,sGAAsG;IACtG,oGAAoG;IACpG,qGAAqG;IACrG,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACJ,CAAC"}
1
+ {"version":3,"file":"Compression.js","sourceRoot":"","sources":["../src/Compression.ts"],"names":[],"mappings":"AAaA,mGAAmG;AACnG,0GAA0G;AAC1G,oCAAoC;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;CACV,CAAC;AAIX,uGAAuG;AACvG,sGAAsG;AACtG,uGAAuG;AACvG,sFAAsF;AACtF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,6FAA6F;IAC7F,sGAAsG;IACtG,oGAAoG;IACpG,qGAAqG;IACrG,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/types",
3
- "version": "0.3.1-next.948.85d9f30",
3
+ "version": "0.3.1-next.970.9691e7b",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {