bun-types 1.1.21-canary.20240723T140524 → 1.1.21-canary.20240724T140618

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.
Files changed (2) hide show
  1. package/bun.d.ts +17 -4
  2. package/package.json +1 -1
package/bun.d.ts CHANGED
@@ -3614,6 +3614,13 @@ declare module "bun" {
3614
3614
  * Filtered data consists mostly of small values with a somewhat random distribution.
3615
3615
  */
3616
3616
  strategy?: number;
3617
+
3618
+ library?: "zlib";
3619
+ }
3620
+
3621
+ interface LibdeflateCompressionOptions {
3622
+ level?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
3623
+ library?: "libdeflate";
3617
3624
  }
3618
3625
 
3619
3626
  /**
@@ -3624,7 +3631,7 @@ declare module "bun" {
3624
3631
  */
3625
3632
  function deflateSync(
3626
3633
  data: Uint8Array | string | ArrayBuffer,
3627
- options?: ZlibCompressionOptions,
3634
+ options?: ZlibCompressionOptions | LibdeflateCompressionOptions,
3628
3635
  ): Uint8Array;
3629
3636
  /**
3630
3637
  * Compresses a chunk of data with `zlib` GZIP algorithm.
@@ -3634,20 +3641,26 @@ declare module "bun" {
3634
3641
  */
3635
3642
  function gzipSync(
3636
3643
  data: Uint8Array | string | ArrayBuffer,
3637
- options?: ZlibCompressionOptions,
3644
+ options?: ZlibCompressionOptions | LibdeflateCompressionOptions,
3638
3645
  ): Uint8Array;
3639
3646
  /**
3640
3647
  * Decompresses a chunk of data with `zlib` INFLATE algorithm.
3641
3648
  * @param data The buffer of data to decompress
3642
3649
  * @returns The output buffer with the decompressed data
3643
3650
  */
3644
- function inflateSync(data: Uint8Array | string | ArrayBuffer): Uint8Array;
3651
+ function inflateSync(
3652
+ data: Uint8Array | string | ArrayBuffer,
3653
+ options?: ZlibCompressionOptions | LibdeflateCompressionOptions,
3654
+ ): Uint8Array;
3645
3655
  /**
3646
3656
  * Decompresses a chunk of data with `zlib` GUNZIP algorithm.
3647
3657
  * @param data The buffer of data to decompress
3648
3658
  * @returns The output buffer with the decompressed data
3649
3659
  */
3650
- function gunzipSync(data: Uint8Array | string | ArrayBuffer): Uint8Array;
3660
+ function gunzipSync(
3661
+ data: Uint8Array | string | ArrayBuffer,
3662
+ options?: ZlibCompressionOptions | LibdeflateCompressionOptions,
3663
+ ): Uint8Array;
3651
3664
 
3652
3665
  type Target =
3653
3666
  /**
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.21-canary.20240723T140524",
2
+ "version": "1.1.21-canary.20240724T140618",
3
3
  "name": "bun-types",
4
4
  "license": "MIT",
5
5
  "main": "",