Skip to content

Commit

Permalink
Documentation and bumped minor version
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinTimBarndt committed Jun 12, 2024
1 parent ac52d97 commit 0594f4a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "wasm-gzip"
version = "2.0.3"
authors = ["ColinTimBarndt <[email protected]>"]
version = "2.1.0"
authors = ["Colin Tim Barndt <[email protected]>"]
license = "Unlicense"
repository = "https://github.com/ColinTimBarndt/wasm-gzip"
description = "Compress and decompress data on the web using WebAssembly."
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

This small library allows compression and decompression with Gzip
using the [libflate] Rust library.
The binary WASM is lightweight (~117 kB WASM + ~2.5 kB JS)
The binary WASM is lightweight (~121 kB WASM + ~2.8 kB JS)
which may be useful for compressing network traffic or for web applications
that let a user save or load compressed files.
that let a user save or load compressed files. Also note that web servers can transfer
compressed files, which can half the size of the WASM file.

The source code can be found on [GitHub](https://github.com/ColinTimBarndt/wasm-gzip).

Expand Down
4 changes: 2 additions & 2 deletions package.release.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Colin Tim Barndt <[email protected]>"
],
"description": "Compress and decompress data on the web using WebAssembly.",
"version": "2.0.3",
"version": "2.1.0",
"license": "Unlicense",
"repository": {
"type": "git",
Expand All @@ -13,7 +13,7 @@
"files": [
"wasm_gzip.wasm",
"wasm_gzip.js",
"wasm_gzip.d.ts"
"*.d.ts"
],
"module": "wasm_gzip.js",
"types": "wasm_gzip.d.ts",
Expand Down
9 changes: 9 additions & 0 deletions src/ts/wasm_gzip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,20 @@ function passData(
}

export interface CompressionOptions {
/**
* Disables LZ77 compression.
*/
noCompression?: boolean;
/**
* Specifies to compress with fixed huffman codes.
*/
fixedHuffmanCodes?: boolean;
}

export interface DecompressionOptions {
/**
* A decoder that decodes all members in a GZIP data array.
*/
multi?: boolean;
}

Expand Down

0 comments on commit 0594f4a

Please sign in to comment.