Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingZhang committed Jul 27, 2020
1 parent 24b08b8 commit 1756624
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you read and write files, need the following permissions
### tar

__defination__
#### defination
```ts
import { tar } from "https://deno.land/x/[email protected]/mod.ts";
export interface compressInterface {
Expand All @@ -23,7 +23,7 @@ tar.compress(src, dest, options?: compressInterface): Promise<void>;
tar.uncompress(src, dest): Promise<void>;
```

__exmaple__
#### exmaple
```ts
import { tar } from "https://deno.land/x/[email protected]/mod.ts";
// compress folder
Expand Down Expand Up @@ -57,7 +57,7 @@ const decompressed = inflateRaw(compressed);

### gzip

__defination__
#### defination
```ts
interface GzipOptions {
level: number;
Expand All @@ -75,10 +75,10 @@ class GzipStream {
}
```

__exmaple__
#### exmaple
compress and uncompress file, only supports compressing and decompressing a single file

**stream mode**
__stream mode__
used to read and write large files
```ts
import { GzipStream } from "https://deno.land/x/[email protected]/mod.ts";
Expand All @@ -90,7 +90,7 @@ await gzip.compress("./big.mkv", "./big.mkv.gz");
await gzip.uncompress("./big.mkv.gz", "./big.mkv");
```

**no stream**
__no stream__
loading all data into memory, so can't get `progress` event
```ts
import { gzipFile, gunzipFile } from "https://deno.land/x/[email protected]/mod.ts";
Expand All @@ -110,7 +110,7 @@ const decompressed = gunzip(compressed);
```

### tgz
__defination__
#### defination
```ts
import { tgz } from "https://deno.land/x/[email protected]/mod.ts";
interface compressInterface {
Expand All @@ -121,7 +121,7 @@ tgz.uncompress(src, dest): Promise<void>;
```

### zip
__defination__
#### defination
```ts
import { zip } from "https://deno.land/x/[email protected]/mod.ts";
interface compressInterface {
Expand Down

0 comments on commit 1756624

Please sign in to comment.