permessage-deflate
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -0,4 +1,9 @@ | ||
### 0.1.7 / 2019-06-10 | ||
- Use the `Buffer.alloc()` and `Buffer.from()` functions instead of the unsafe | ||
`Buffer()` constructor | ||
### 0.1.6 / 2017-09-10 | ||
* Use `9` instead of `8` as the `windowBits` parameter to zlib, to deal with | ||
- Use `9` instead of `8` as the `windowBits` parameter to zlib, to deal with | ||
restrictions introduced in zlib v1.2.9 | ||
@@ -8,7 +13,7 @@ | ||
* Catch errors thrown by `close()` on zlib streams | ||
- Catch errors thrown by `close()` on zlib streams | ||
### 0.1.4 / 2015-11-06 | ||
* The server does not send `server_max_window_bits` if the client does not ask | ||
- The server does not send `server_max_window_bits` if the client does not ask | ||
for it; this works around an issue in Firefox. | ||
@@ -18,14 +23,14 @@ | ||
* Fix a race condition causing some fragments of deflate output to be dropped | ||
* Make sure to emit minimal output on all Node versions | ||
- Fix a race condition causing some fragments of deflate output to be dropped | ||
- Make sure to emit minimal output on all Node versions | ||
### 0.1.2 / 2014-12-18 | ||
* Don't allow configure() to be called with unrecognized options | ||
- Don't allow configure() to be called with unrecognized options | ||
### 0.1.1 / 2014-12-15 | ||
* Fix race condition when using context takeover, where adjacent messages have | ||
- Fix race condition when using context takeover, where adjacent messages have | ||
data listeners bound at the same time and end up duplicating output | ||
* Use `DeflateRaw.flush()` correctly on v0.10 so that optimal compression is | ||
- Use `DeflateRaw.flush()` correctly on v0.10 so that optimal compression is | ||
achieved | ||
@@ -35,2 +40,2 @@ | ||
* Initial release | ||
- Initial release |
'use strict'; | ||
var Buffer = require('safe-buffer').Buffer; | ||
var common = { | ||
@@ -15,13 +17,2 @@ VALID_PARAMS: [ | ||
concat: function(buffers, length) { | ||
var buffer = new Buffer(length), | ||
offset = 0; | ||
for (var i = 0, n = buffers.length; i < n; i++) { | ||
buffers[i].copy(buffer, offset); | ||
offset += buffers[i].length; | ||
} | ||
return buffer; | ||
}, | ||
fetch: function(options, key, _default) { | ||
@@ -28,0 +19,0 @@ if (options.hasOwnProperty(key)) |
'use strict'; | ||
var zlib = require('zlib'), | ||
var Buffer = require('safe-buffer').Buffer, | ||
zlib = require('zlib'), | ||
common = require('./common'); | ||
@@ -60,6 +61,6 @@ | ||
inflate.write(message.data); | ||
inflate.write(new Buffer([0x00, 0x00, 0xff, 0xff])); | ||
inflate.write(Buffer.from([0x00, 0x00, 0xff, 0xff])); | ||
inflate.flush(function() { | ||
message.data = common.concat(chunks, length); | ||
message.data = Buffer.concat(chunks, length); | ||
return_(null, message); | ||
@@ -107,3 +108,3 @@ }); | ||
var onFlush = function() { | ||
var data = common.concat(chunks, length); | ||
var data = Buffer.concat(chunks, length); | ||
message.data = data.slice(0, data.length - 4); | ||
@@ -163,3 +164,3 @@ message.rsv1 = true; | ||
this._flushFlag = zlib.Z_SYNC_FLUSH; | ||
this.write(new Buffer(0), '', callback); | ||
this.write(Buffer.alloc(0), '', callback); | ||
} | ||
@@ -166,0 +167,0 @@ }; |
@@ -1,20 +0,12 @@ | ||
# The MIT License | ||
Copyright 2014-2019 James Coglan | ||
Copyright (c) 2014-2017 James Coglan | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the 'Software'), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
Unless required by applicable law or agreed to in writing, software distributed | ||
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. |
@@ -1,22 +0,34 @@ | ||
{ "name" : "permessage-deflate" | ||
, "description" : "Per-message DEFLATE compression extension for WebSocket connections" | ||
, "homepage" : "https://github.com/faye/permessage-deflate-node" | ||
, "author" : "James Coglan <jcoglan@gmail.com> (http://jcoglan.com/)" | ||
, "keywords" : ["websocket", "compression", "deflate"] | ||
, "license" : "MIT" | ||
, "version" : "0.1.6" | ||
, "engines" : { "node": ">=0.8.0" } | ||
, "files" : ["lib"] | ||
, "main" : "./lib/permessage_deflate" | ||
, "devDependencies" : { "jstest": "*" } | ||
, "scripts" : { "test": "jstest spec/runner.js" } | ||
, "repository" : { "type" : "git" | ||
, "url" : "git://github.com/faye/permessage-deflate-node.git" | ||
} | ||
, "bugs" : "https://github.com/faye/permessage-deflate-node/issues" | ||
{ | ||
"name": "permessage-deflate", | ||
"description": "Per-message DEFLATE compression extension for WebSocket connections", | ||
"homepage": "https://github.com/faye/permessage-deflate-node", | ||
"author": "James Coglan <jcoglan@gmail.com> (http://jcoglan.com/)", | ||
"keywords": [ | ||
"websocket", | ||
"compression", | ||
"deflate" | ||
], | ||
"license": "Apache-2.0", | ||
"version": "0.1.7", | ||
"engines": { | ||
"node": ">=0.8.0" | ||
}, | ||
"files": [ | ||
"lib" | ||
], | ||
"main": "./lib/permessage_deflate", | ||
"dependencies": { | ||
"safe-buffer": "*" | ||
}, | ||
"devDependencies": { | ||
"jstest": "*" | ||
}, | ||
"scripts": { | ||
"test": "jstest spec/runner.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/faye/permessage-deflate-node.git" | ||
}, | ||
"bugs": "https://github.com/faye/permessage-deflate-node/issues" | ||
} |
@@ -48,9 +48,9 @@ # permessage-deflate [![Build status](https://secure.travis-ci.org/faye/permessage-deflate-node.svg)](http://travis-ci.org/faye/permessage-deflate-node) | ||
* `level`: sets the compression level, can be an integer from `0` to `9`, or one | ||
- `level`: sets the compression level, can be an integer from `0` to `9`, or one | ||
of the constants `zlib.Z_NO_COMPRESSION`, `zlib.Z_BEST_SPEED`, | ||
`zlib.Z_BEST_COMPRESSION`, or `zlib.Z_DEFAULT_COMPRESSION` | ||
* `memLevel`: sets how much memory the compressor allocates, can be an integer | ||
- `memLevel`: sets how much memory the compressor allocates, can be an integer | ||
from `1` to `9`, or one of the constants `zlib.Z_MIN_MEMLEVEL`, | ||
`zlib.Z_MAX_MEMLEVEL`, or `zlib.Z_DEFAULT_MEMLEVEL` | ||
* `strategy`: can be one of the constants `zlib.Z_FILTERED`, | ||
- `strategy`: can be one of the constants `zlib.Z_FILTERED`, | ||
`zlib.Z_HUFFMAN_ONLY`, `zlib.Z_RLE`, `zlib.Z_FIXED`, or | ||
@@ -62,10 +62,10 @@ `zlib.Z_DEFAULT_STRATEGY` | ||
* `noContextTakeover`: if `true`, stops the session reusing a deflate context | ||
- `noContextTakeover`: if `true`, stops the session reusing a deflate context | ||
between messages | ||
* `requestNoContextTakeover`: if `true`, makes the session tell the other peer | ||
- `requestNoContextTakeover`: if `true`, makes the session tell the other peer | ||
not to reuse a deflate context between messages | ||
* `maxWindowBits`: an integer from `8` to `15` inclusive that sets the maximum | ||
- `maxWindowBits`: an integer from `8` to `15` inclusive that sets the maximum | ||
size of the session's sliding window; a lower window size will be used if | ||
requested by the peer | ||
* `requestMaxWindowBits`: an integer from `8` to `15` inclusive to ask the other | ||
- `requestMaxWindowBits`: an integer from `8` to `15` inclusive to ask the other | ||
peer to use to set its maximum sliding window size, if supported |
Floating dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
spdx disjunction for an artifact's license information
Licensespdx disjunction for an artifact's license information
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license
Found 1 instance in 1 package
spdx disjunction for an artifact's license information
Licensespdx disjunction for an artifact's license information
Found 1 instance in 1 package
17214
1
2
80
319
1
+ Addedsafe-buffer@*
+ Addedsafe-buffer@5.2.1(transitive)