@naturalcycles/nodejs-lib 15.67.0 → 15.67.1

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.
@@ -34,7 +34,7 @@ export async function inflateBuffer(buf, options = {}) {
34
34
  * It's 9 bytes shorter than `gzip`.
35
35
  */
36
36
  export async function deflateString(s, options) {
37
- return await deflateBuffer(Buffer.from(s), options);
37
+ return await deflate(s, options);
38
38
  }
39
39
  export async function inflateToString(buf, options) {
40
40
  return (await inflateBuffer(buf, options)).toString();
@@ -54,7 +54,7 @@ export async function gunzipBuffer(buf, options = {}) {
54
54
  * It's 9 bytes longer than `deflate`.
55
55
  */
56
56
  export async function gzipString(s, options) {
57
- return await gzipBuffer(Buffer.from(s), options);
57
+ return await gzip(s, options);
58
58
  }
59
59
  export async function gunzipToString(buf, options) {
60
60
  return (await gunzipBuffer(buf, options)).toString();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/nodejs-lib",
3
3
  "type": "module",
4
- "version": "15.67.0",
4
+ "version": "15.67.1",
5
5
  "dependencies": {
6
6
  "@naturalcycles/js-lib": "^15",
7
7
  "@types/js-yaml": "^4",
@@ -50,7 +50,7 @@ export async function deflateString(
50
50
  s: string,
51
51
  options?: ZlibOptions,
52
52
  ): Promise<Buffer<ArrayBuffer>> {
53
- return await deflateBuffer(Buffer.from(s), options)
53
+ return await deflate(s, options)
54
54
  }
55
55
 
56
56
  export async function inflateToString(buf: Buffer, options?: ZlibOptions): Promise<string> {
@@ -80,7 +80,7 @@ export async function gunzipBuffer(
80
80
  * It's 9 bytes longer than `deflate`.
81
81
  */
82
82
  export async function gzipString(s: string, options?: ZlibOptions): Promise<Buffer<ArrayBuffer>> {
83
- return await gzipBuffer(Buffer.from(s), options)
83
+ return await gzip(s, options)
84
84
  }
85
85
 
86
86
  export async function gunzipToString(buf: Buffer, options?: ZlibOptions): Promise<string> {