Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hazae41
committed
Jun 29, 2020
1 parent
d15237e
commit f5c3d55
Showing
9 changed files
with
94 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
import { inflate, deflate } from "./mod.ts"; | ||
import { inflate, deflate, gzip, gunzip, zlib, unzlib } from "./mod.ts"; | ||
|
||
const bytes = new Uint8Array([1, 2, 3]); | ||
console.log(bytes); | ||
|
||
const compressed = deflate(bytes); | ||
console.log(compressed); | ||
function test_deflate() { | ||
const compressed = deflate(bytes, undefined); | ||
const decompressed = inflate(compressed); | ||
console.log(decompressed); | ||
} | ||
|
||
const decompressed = inflate(compressed); | ||
console.log(decompressed); | ||
function test_gzip() { | ||
const compressed = gzip(bytes, undefined); | ||
const decompressed = gunzip(compressed); | ||
console.log(decompressed); | ||
} | ||
|
||
function test_zlib() { | ||
const compressed = zlib(bytes, undefined); | ||
const decompressed = unzlib(compressed); | ||
console.log(decompressed); | ||
} | ||
|
||
test_deflate(); | ||
test_gzip(); | ||
test_zlib(); |