source: trip-planner-front/node_modules/hpack.js/README.md@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[6a3a178]1# HPACK.js
2
3[![Build Status](https://secure.travis-ci.org/indutny/hpack.js.png)](http://travis-ci.org/indutny/hpack.js)
4[![NPM version](https://badge.fury.io/js/hpack.js.svg)](http://badge.fury.io/js/hpack.js)
5
6Plain-JS implementation of [HPACK][0].
7
8## Usage
9
10```javascript
11var hpack = require('hpack.js');
12
13var comp = hpack.compressor.create({ table: { size: 256 } });
14var decomp = hpack.decompressor.create({ table: { size: 256 } });
15
16comp.write([ { name: 'host', value: 'localhost' } ]);
17var raw = comp.read();
18console.log(raw);
19// <Buffer 66 86 a0 e4 1d 13 9d 09>
20
21decomp.write(raw);
22decomp.execute();
23console.log(decomp.read());
24// { name: 'host', value: 'localhost', neverIndex: false }
25```
26
27#### LICENSE
28
29This software is licensed under the MIT License.
30
31Copyright Fedor Indutny, 2015.
32
33Permission is hereby granted, free of charge, to any person obtaining a
34copy of this software and associated documentation files (the
35"Software"), to deal in the Software without restriction, including
36without limitation the rights to use, copy, modify, merge, publish,
37distribute, sublicense, and/or sell copies of the Software, and to permit
38persons to whom the Software is furnished to do so, subject to the
39following conditions:
40
41The above copyright notice and this permission notice shall be included
42in all copies or substantial portions of the Software.
43
44THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
45OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
46MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
47NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
48DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
49OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
50USE OR OTHER DEALINGS IN THE SOFTWARE.
51
52[0]: https://tools.ietf.org/html/rfc7541
Note: See TracBrowser for help on using the repository browser.