Skip to content

Commit 8b8ed06

Browse files
author
zhangfuxing
committed
0.5.4
1 parent 44d53c3 commit 8b8ed06

File tree

3 files changed

+26
-22
lines changed

3 files changed

+26
-22
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ If you want to read and write files, you need the following [permissions](https:
2222
2323
## `tar`
2424

25-
v0.5.3
25+
v0.5.4
2626
Use `@std/tar` instead of `@std/archive` due to deprecation
2727
If you want to use the old API, you can do it
2828

@@ -34,11 +34,11 @@ If you want to use the old API, you can do it
3434
// JSR
3535
import { tar } from "jsr:@deno-library/compress";
3636
// or
37-
// import { tar } from "jsr:@deno-library/[email protected].3";
37+
// import { tar } from "jsr:@deno-library/[email protected].4";
3838
// or
39-
// import { tar } from "https://deno.land/x/[email protected].3/mod.ts";
39+
// import { tar } from "https://deno.land/x/[email protected].4/mod.ts";
4040
// or only import tar
41-
// import { tar } from "https://deno.land/x/[email protected].3/tar/mod.ts";
41+
// import { tar } from "https://deno.land/x/[email protected].4/tar/mod.ts";
4242
export interface compressInterface {
4343
excludeSrc?: boolean; // does not contain the src directory
4444
debug?: boolean; // list the files and folders
@@ -56,7 +56,7 @@ tar.uncompress(src, dest, options?: uncompressInterface): Promise<void>;
5656
// JSR
5757
import { tar } from "jsr:@deno-library/compress";
5858
// or
59-
// import { tar } from "https://deno.land/x/[email protected].3/mod.ts";
59+
// import { tar } from "https://deno.land/x/[email protected].4/mod.ts";
6060
// compress folder
6161
await tar.compress("./test", "./test.tar");
6262
// compress folder, exclude src directory
@@ -83,9 +83,9 @@ import {
8383
inflateRaw,
8484
} from "jsr:@deno-library/compress";
8585
// or
86-
// import { deflate, inflate, deflateRaw, inflateRaw } from "https://deno.land/x/[email protected].3/mod.ts";
86+
// import { deflate, inflate, deflateRaw, inflateRaw } from "https://deno.land/x/[email protected].4/mod.ts";
8787
// or only import deflate, inflate, deflateRaw, inflateRaw
88-
// import { deflate, inflate, deflateRaw, inflateRaw } from "https://deno.land/x/[email protected].3/zlib/mod.ts";
88+
// import { deflate, inflate, deflateRaw, inflateRaw } from "https://deno.land/x/[email protected].4/zlib/mod.ts";
8989
const str = "hello world!";
9090
const bytes = new TextEncoder().encode(str);
9191
// with zlib header
@@ -128,9 +128,9 @@ Useful for reading and writing large files.
128128
```ts
129129
import { GzipStream } from "jsr:@deno-library/compress";
130130
// or
131-
// import { GzipStream } from "https://deno.land/x/[email protected].3/mod.ts";
131+
// import { GzipStream } from "https://deno.land/x/[email protected].4/mod.ts";
132132
// or only import GzipStream
133-
// import { GzipStream } from "https://deno.land/x/[email protected].3/gzip/mod.ts";
133+
// import { GzipStream } from "https://deno.land/x/[email protected].4/gzip/mod.ts";
134134
const gzip = new GzipStream();
135135
gzip.on("progress", (progress: string) => {
136136
console.log(progress); // 0.00% => 100.00%
@@ -145,9 +145,9 @@ await gzip.uncompress("./big.mkv.gz", "./big.mkv");
145145
```ts
146146
import { gunzipFile, gzipFile } from "jsr:@deno-library/compress";
147147
// or
148-
// import { gunzipFile, gzipFile } from "https://deno.land/x/[email protected].3/mod.ts";
148+
// import { gunzipFile, gzipFile } from "https://deno.land/x/[email protected].4/mod.ts";
149149
// or only import gzipFile, gunzipFile
150-
// import { gzipFile, gunzipFile } from "https://deno.land/x/[email protected].3/gzip/mod.ts";
150+
// import { gzipFile, gunzipFile } from "https://deno.land/x/[email protected].4/gzip/mod.ts";
151151
await gzipFile("./deno.txt", "./deno.txt.gz");
152152
await gunzipFile("./deno.txt.gz", "./deno.txt");
153153
```
@@ -160,9 +160,9 @@ await gunzipFile("./deno.txt.gz", "./deno.txt");
160160
```ts
161161
import { gunzip, gzip } from "jsr:@deno-library/compress";
162162
// or
163-
// import { gunzip, gzip } from "https://deno.land/x/[email protected].3/mod.ts";
163+
// import { gunzip, gzip } from "https://deno.land/x/[email protected].4/mod.ts";
164164
// or only import gzip, gunzip
165-
// import { gzip, gunzip } from "https://deno.land/x/[email protected].3/zlib/mod.ts";
165+
// import { gzip, gunzip } from "https://deno.land/x/[email protected].4/zlib/mod.ts";
166166
// gzip
167167
const bytes = new TextEncoder().encode("hello");
168168
const compressed = gzip(bytes);
@@ -172,7 +172,7 @@ const decompressed = gunzip(compressed);
172172

173173
## `tgz`
174174

175-
v0.5.3
175+
v0.5.4
176176
Use `@std/tar` instead of `@std/archive` due to deprecation
177177
If you want to use the old API, you can do it
178178

@@ -183,9 +183,9 @@ If you want to use the old API, you can do it
183183
```ts
184184
import { tgz } from "jsr:@deno-library/compress";
185185
// or
186-
// import { tgz } from "https://deno.land/x/[email protected].3/mod.ts";
186+
// import { tgz } from "https://deno.land/x/[email protected].4/mod.ts";
187187
// or only import tgz
188-
// import { tgz } from "https://deno.land/x/[email protected].3/tgz/mod.ts";
188+
// import { tgz } from "https://deno.land/x/[email protected].4/tgz/mod.ts";
189189
export interface compressInterface {
190190
excludeSrc?: boolean; // does not contain the src directory
191191
debug?: boolean; // list the files and folders
@@ -202,7 +202,7 @@ tgz.uncompress(src, dest, options?: uncompressInterface): Promise<void>;
202202
```ts
203203
import { tgz } from "jsr:@deno-library/compress";
204204
// or
205-
// import { tgz } from "https://deno.land/x/[email protected].3/mod.ts";
205+
// import { tgz } from "https://deno.land/x/[email protected].4/mod.ts";
206206
// compress folder
207207
await tgz.compress("./test", "./test.tar.gz");
208208
// compress folder, exclude src directory
@@ -220,9 +220,9 @@ await tgz.uncompress("./test.tar.gz", "./dest");
220220
```ts
221221
import { zip } from "jsr:@deno-library/compress";
222222
// or
223-
// import { zip } from "https://deno.land/x/[email protected].3/mod.ts";
223+
// import { zip } from "https://deno.land/x/[email protected].4/mod.ts";
224224
// or only import zip
225-
// import { zip } from "https://deno.land/x/[email protected].3/zip/mod.ts";
225+
// import { zip } from "https://deno.land/x/[email protected].4/zip/mod.ts";
226226

227227
export interface compressInterface {
228228
excludeSrc?: boolean; // does not contain the src directory
@@ -240,7 +240,7 @@ zip.uncompress(src, dest, options?: uncompressInterface): Promise<void>;
240240
```ts
241241
import { zip } from "jsr:@deno-library/compress";
242242
// or
243-
// import { zip } from "https://deno.land/x/[email protected].3/mod.ts";
243+
// import { zip } from "https://deno.land/x/[email protected].4/mod.ts";
244244
// compress folder
245245
await zip.compress("./test", "./test.tar.gz");
246246
// compress folder, exclude src directory

changelog.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
## Changelog
22

3-
### v0.5.3 - 2024.11.20
3+
### v0.5.4 - 2024.11.20
44

55
- fix: zip.compress does not close the dest file if src does not exist[#19]
66

7+
### v0.5.3 - 2024.11.20
8+
9+
- docs: update readme
10+
711
### v0.5.2 - 2024.11.6
812

913
- docs: Add symbol documentation to existing interfaces

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "@deno-library/compress",
3-
"version": "0.5.3",
3+
"version": "0.5.4",
44
"exports": "./mod.ts"
55
}

0 commit comments

Comments
 (0)