Skip to content

Commit

Permalink
Bump v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zhipeng-jia committed Jun 21, 2022
1 parent ff63bdb commit 3ccc1b6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "snappyjs",
"main": "./dist/snappyjs.js",
"version": "0.6.1",
"version": "0.7.0",
"homepage": "https://github.com/zhipeng-jia/snappyjs",
"authors": [
"Zhipeng Jia <[email protected]>"
Expand Down
7 changes: 5 additions & 2 deletions dist/snappyjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* snappyjs:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Zhipeng Jia
* version: 0.6.1
* version: 0.7.0
*
* This header is generated by licensify (https://github.com/twada/licensify)
*/
Expand Down Expand Up @@ -93,7 +93,7 @@ var SnappyCompressor = require('./snappy_compressor').SnappyCompressor

var TYPE_ERROR_MSG = 'Argument compressed must be type of ArrayBuffer, Buffer, or Uint8Array'

function uncompress (compressed) {
function uncompress (compressed, maxLength) {
if (!isUint8Array(compressed) && !isArrayBuffer(compressed) && !isBuffer(compressed)) {
throw new TypeError(TYPE_ERROR_MSG)
}
Expand All @@ -110,6 +110,9 @@ function uncompress (compressed) {
if (length === -1) {
throw new Error('Invalid Snappy bitstream')
}
if (length > maxLength) {
throw new Error(`The uncompressed length of ${length} is too big, expect at most ${maxLength}`)
}
var uncompressed, uncompressedView
if (uint8Mode) {
uncompressed = new Uint8Array(length)
Expand Down
4 changes: 2 additions & 2 deletions dist/snappyjs.min.js

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

4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snappyjs",
"version": "0.6.1",
"version": "0.7.0",
"description": "JavaScript implementation of Google's Snappy compression library",
"repository": "zhipeng-jia/snappyjs",
"main": "index.js",
Expand Down

0 comments on commit 3ccc1b6

Please sign in to comment.