You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 2, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 2, 2025. It is now read-only.
This feature is definitely on the roadmap but it will require some time since there are lots of options to support (independence of blocks, checksums, preset dictionaries).
Not sure if it is applicable within current context
but if you plan on using a wrapper to C functions to achieve this objective,
then there is a new library within lz4, called lz4frame,
which does all the work of adding / decoding header information automatically.
It also takes care of streaming behavior, when requested, automatically.
Of course, if you want to rebuild it in pure Java, then this library doesn't help.
I would then recommend following the example of Takayuki Matsuaka's lz4mt : https://github.com/t-mat/lz4mt
because it's clean, and very easy to understand
(although limited to independent block modes).
Activity
jpountz commentedon Aug 20, 2013
Hi Jeffrey. Your assumptions are correct, I implemented LZ4Block(In|Out)putStream based on https://github.com/exalead/fastlzlib before the lz4 streaming format went out.
This feature is definitely on the roadmap but it will require some time since there are lots of options to support (independence of blocks, checksums, preset dictionaries).
stevenschlansker commentedon Jun 3, 2014
+1!
bfg commentedon Jul 11, 2014
+1
stevenschlansker commentedon Dec 1, 2014
Any possibility of this getting some love? We're looking to use LZ4 even more but not being able to interchange with other implementation sucks.
jpountz commentedon Dec 3, 2014
This is a big task and I don't have much time for this project these days, but I could help if someone wants to try to implement it...
Cyan4973 commentedon Dec 4, 2014
Not sure if it is applicable within current context
but if you plan on using a wrapper to C functions to achieve this objective,
then there is a new library within lz4, called lz4frame,
which does all the work of adding / decoding header information automatically.
It also takes care of streaming behavior, when requested, automatically.
Of course, if you want to rebuild it in pure Java, then this library doesn't help.
I would then recommend following the example of Takayuki Matsuaka's lz4mt :
https://github.com/t-mat/lz4mt
because it's clean, and very easy to understand
(although limited to independent block modes).
Regards
phraktle commentedon Apr 5, 2015
+1 for this.
Btw, there's a basic implementation already available in Apache Kafka, see:
https://github.com/apache/kafka/tree/0.8.2/clients/src/main/java/org/apache/kafka/common/message
drcrallen commentedon Apr 10, 2015
It seems to have moved in trunk:
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/record/KafkaLZ4BlockOutputStream.java
Also, it says it supports "A partial implementation of the v1.4.1 LZ4 Frame format." rather than full 1.5 support, which is concerning.
dpkp commentedon May 3, 2016
The Kafka implementation is a bit broken, but I've done some work to fix it and update for 1.5.1 lz4 frame spec. See https://cwiki.apache.org/confluence/display/KAFKA/KIP-57+-+Interoperable+LZ4+Framing and apache/kafka#1212
odaira commentedon Sep 17, 2018
Thanks all, and the LZ4 Frame format has been supported by lz4-java since 1.4.0.