netty-snappy

0.0.2 • Public • Published

netty中的协议压缩

netty codec -> SnappyFramedDecoder 和 Encoder

查看

https://github.com/zhaojunlike/netty-snappy-framed

使用

yarn add netty-snappy
        const CryptoJs = require('crypto-js');
        const {snappy}=require('netty-snappy')
        const str = "{adasdas\"\"}";
        const compressed = CryptoJs.enc.Base64.stringify(snappy.compress(str));
        console.debug('compress:' + compressed);
        const uncompressed = snappy.decompress(compressed);
        console.debug('decompress:' + uncompressed);
        assert(str === uncompressed)

Readme

Keywords

none

Package Sidebar

Install

npm i netty-snappy

Weekly Downloads

0

Version

0.0.2

License

none

Unpacked Size

469 kB

Total Files

4

Last publish

Collaborators

  • zhaojunlike