Neverending Programming Mistakes
Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

kafkajs-lz4

1.1.0 • Public • Published

kafkajs-lz4

Build Status NPM Version

TypeScript-ready lz4 compression codec for KafkaJS.

Install

$ yarn install kafkajs-lz4

Usage

import { CompressionTypes, CompressionCodecs } from 'kafkajs';
import LZ4Codec from 'kafkajs-lz4';
 
CompressionCodecs[CompressionTypes.LZ4] = new LZ4Codec().codec;

Options

All options are transparently passed on to the lz4 library's synchronous encoding options.

Example

To allow encoding Kafka messages of up to 25 MB in size —

const lz4Codec = new LZ4Codec({
    blockMaxSize: 26214400
}).codec;
 
CompressionCodecs[CompressionTypes.LZ4] = lz4Codec;

install

npm i kafkajs-lz4

Downloadsweekly downloads

2

version

1.1.0

license

MIT

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability