Skip to content

Commit 86864a8

Browse files
committed
Return back ungzip as alias
1 parent 1754a8b commit 86864a8

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

src/inflate.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ class Inflate {
387387

388388

389389
/**
390-
* Decompress `data` with inflate/ungzip and `options`. Autodetect `gzip`/`zlib`
390+
* One-shot inflate decompress. Autodetect `gzip`/`zlib`
391391
* format via wrapper header — so {@link ungzip} is just a convenience alias of
392392
* this function. See {@link InflateOptions} for zlib options. Set
393393
* `toText: true` to decode the result as UTF-8 text.
@@ -435,18 +435,5 @@ function inflateRaw<O extends InflateOptions & { toText?: boolean }>(
435435
}
436436

437437

438-
/**
439-
* The same as {@link inflate}. Provided under a named export for convenience:
440-
* {@link inflate} already autodetects the gzip format from the wrapper header,
441-
* so there is no separate decoding logic here.
442-
*/
443-
function ungzip<O extends InflateOptions & { toText?: boolean }>(
444-
input: InflateInput,
445-
options: O = {} as O
446-
): O extends { toText: true } ? string : Uint8Array {
447-
return inflate<O>(input, options);
448-
}
449-
450-
451-
export { Inflate, inflate, inflateRaw, ungzip };
438+
export { Inflate, inflate, inflateRaw, inflate as ungzip };
452439
export type { InflateInput, InflateOptions };

0 commit comments

Comments
 (0)