From ba8238a2b53ff46ddabb7082eb7da98cf4be3758 Mon Sep 17 00:00:00 2001 From: fuxingZhang <502545703@qq.com> Date: Thu, 8 Apr 2021 17:42:20 +0800 Subject: [PATCH] v0.3.8 --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4352535..b2ee29c 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ The reason can be seen here: #### definition ```ts -import { tar } from "https://deno.land/x/compress@v0.3.7/mod.ts"; +import { tar } from "https://deno.land/x/compress@v0.3.8/mod.ts"; // or only import tar -// import { tar } from "https://deno.land/x/compress@v0.3.7/tar/mod.ts"; +// import { tar } from "https://deno.land/x/compress@v0.3.8/tar/mod.ts"; export interface compressInterface { excludeSrc?: boolean; // exclude src directory, default: include src directory } @@ -30,7 +30,7 @@ tar.uncompress(src, dest): Promise; #### example ```ts -import { tar } from "https://deno.land/x/compress@v0.3.7/mod.ts"; +import { tar } from "https://deno.land/x/compress@v0.3.8/mod.ts"; // compress folder await tar.compress("./test","./test.tar"); // compress folder, exclude src directory @@ -50,9 +50,9 @@ import { /** Compress data using deflate, and do not append a zlib header. */ deflateRaw, inflateRaw -} from "https://deno.land/x/compress@v0.3.7/mod.ts"; +} from "https://deno.land/x/compress@v0.3.8/mod.ts"; // or only import deflate, inflate, deflateRaw, inflateRaw -// import { deflate, inflate, deflateRaw, inflateRaw } from "https://deno.land/x/compress@v0.3.7/zlib/mod.ts"; +// import { deflate, inflate, deflateRaw, inflateRaw } from "https://deno.land/x/compress@v0.3.8/zlib/mod.ts"; const str = "hello world!"; const bytes = new TextEncoder().encode(str); // with zlib header @@ -89,9 +89,9 @@ compress and uncompress file, only supports compressing and decompressing a sing __stream mode__ used to read and write large files ```ts -import { GzipStream } from "https://deno.land/x/compress@v0.3.7/mod.ts"; +import { GzipStream } from "https://deno.land/x/compress@v0.3.8/mod.ts"; // or only import GzipStream -// import { GzipStream } from "https://deno.land/x/compress@v0.3.7/gzip/mod.ts"; +// import { GzipStream } from "https://deno.land/x/compress@v0.3.8/gzip/mod.ts"; const gzip = new GzipStream(); gzip.on("progress", (progress: string) => { console.log(progress); // 0.00% => 100.00% @@ -103,9 +103,9 @@ await gzip.uncompress("./big.mkv.gz", "./big.mkv"); __no stream mode__ loading all data into memory, so can't get `progress` event ```ts -import { gzipFile, gunzipFile } from "https://deno.land/x/compress@v0.3.7/mod.ts"; +import { gzipFile, gunzipFile } from "https://deno.land/x/compress@v0.3.8/mod.ts"; // or only import gzipFile, gunzipFile -// import { gzipFile, gunzipFile } from "https://deno.land/x/compress@v0.3.7/gzip/mod.ts"; +// import { gzipFile, gunzipFile } from "https://deno.land/x/compress@v0.3.8/gzip/mod.ts"; await gzipFile("./deno.txt", "./deno.txt.gz"); await gunzipFile("./deno.txt.gz", "./deno.txt"); ``` @@ -113,9 +113,9 @@ await gunzipFile("./deno.txt.gz", "./deno.txt"); **gzip/gunzip string or bytes** > This is a pure TypeScript implementation. Almost as fast as Rust implementation. ```ts -import { gzip, gunzip } from "https://deno.land/x/compress@v0.3.7/mod.ts"; +import { gzip, gunzip } from "https://deno.land/x/compress@v0.3.8/mod.ts"; // or only import gzip, gunzip -// import { gzip, gunzip } from "https://deno.land/x/compress@v0.3.7/zlib/mod.ts"; +// import { gzip, gunzip } from "https://deno.land/x/compress@v0.3.8/zlib/mod.ts"; // gzip const bytes = new TextEncoder().encode("hello"); const compressed = gzip(bytes); @@ -127,9 +127,9 @@ const decompressed = gunzip(compressed); #### definition ```ts -import { tgz } from "https://deno.land/x/compress@v0.3.7/mod.ts"; +import { tgz } from "https://deno.land/x/compress@v0.3.8/mod.ts"; // or only import tgz -// import { tgz } from "https://deno.land/x/compress@v0.3.7/tgz/mod.ts"; +// import { tgz } from "https://deno.land/x/compress@v0.3.8/tgz/mod.ts"; interface compressInterface { excludeSrc?: boolean; // exclude src directory, default: include src directory } @@ -139,7 +139,7 @@ tgz.uncompress(src, dest): Promise; #### example ```ts -import { tgz } from "https://deno.land/x/compress@v0.3.7/mod.ts"; +import { tgz } from "https://deno.land/x/compress@v0.3.8/mod.ts"; // compress folder await tgz.compress("./test","./test.tar.gz"); // compress folder, exclude src directory @@ -155,7 +155,7 @@ Not implemented #### definition ```ts -import { zip } from "https://deno.land/x/compress@v0.3.7/mod.ts"; +import { zip } from "https://deno.land/x/compress@v0.3.8/mod.ts"; interface compressInterface { excludeSrc?: boolean; // exclude src directory, default: include src directory }