Socket
Socket
Sign inDemoInstall

brotli

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "brotli",
"version": "1.0.0",
"version": "1.0.1",
"description": "A port of the Brotli compression algorithm as used in WOFF2",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -22,3 +22,3 @@ # Brotli.js

### brotli.decode(buffer, outSize)
### brotli.decompress(buffer, outSize)

@@ -34,9 +34,9 @@ Decompresses the given buffer to produce the original input to the compressor.

// decode a buffer where the output size is known
brotli.decode(compressedData, uncompressedLength);
brotli.decompress(compressedData, uncompressedLength);
// decode a buffer where the output size is not known
brotli.decode(fs.readFileSync('compressed.bin'));
brotli.decompress(fs.readFileSync('compressed.bin'));
```
### brotli.encode(buffer, isText = false)
### brotli.compress(buffer, isText = false)

@@ -49,6 +49,6 @@ Compresses the given buffer. Pass `true` as the second argument if the input

// encode a buffer of binary data
brotli.encode(fs.readFileSync('myfile.bin'));
brotli.compress(fs.readFileSync('myfile.bin'));
// encode some text data
brotli.encode(fs.readFileSync('myfile.bin'), true);
brotli.compress(fs.readFileSync('myfile.bin'), true);
```

@@ -55,0 +55,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc