Questions tagged [lz4]

LZ4 is a lossless data compression algorithm that is focused on compression and decompression speed

LZ4 is a lossless data compression algorithm that is focused on compression and decompression speed. It belongs to the LZ77 family of byte-oriented compression schemes.

Use this tag for questions that have issues with the implementations in one of the native languages or binding like c, c++, java, python.

LZ4 Repository

LZ4 Homepage

Adapted From Wikipedia

166 questions
5
votes
1 answer

PostgreSql 14 lz4 compression not working?

I have a PostgrSql 14 installed and I want to compress some of my data to save some of a disk space. The data is audio files (1kb - 5mb), converted to a base64 strings. I created 3 tables: CREATE TABLE t_uncompressed ( file_name VARCHAR(50) NOT…
Frankie Drake
  • 1,338
  • 9
  • 24
  • 40
5
votes
1 answer

Decompressing a content of unknown length with python-lz4

I am trying to decompress a content of unknown size using python-lz4 using the following code with open("compressed.msgpk", "rb") as f: content = f.read() if content[0] == 1: uncompressed = lz4.block.decompress(content[1:]) but it…
Waqas
  • 6,812
  • 2
  • 33
  • 50
5
votes
1 answer

Swift Compression: doesn't decompress LZ4 image

I'm trying to decompress an lz4-compressed png image with the Swift Compression package, but the code exits with a zero size. My code is as follows, and the decompressed file is expected to be 240Kb. [UPDATE 2] I've stumbled upon this in the Apple's…
Stéphane de Luca
  • 12,745
  • 9
  • 57
  • 95
5
votes
0 answers

decompressing LZ4 compressed string using lz4net

I want to decompress a LZ4 encoded string using the lz4net library available from NuGet https://www.nuget.org/packages/lz4net/, the GitHub site for this library is https://github.com/MiloszKrajewski/lz4net. I'm not familiar with streams nor this…
George
  • 1,111
  • 3
  • 20
  • 38
5
votes
1 answer

Uncompressing a LZ4 blob with Perl

I have a table in a SQLite db that stores blobs compressed with LZ4 algorithm. I am trying to use decompress/uncompress functions from Compress::LZ4, but not getting any success with it. The sample SQLite db can be downloaded from here. Here is how…
user2006190
  • 107
  • 1
  • 4
5
votes
2 answers

How to install lz4 shared libraries in rpm based machines?

I tried to install lz4 libraries in CentOS, but failing with the following error. [Bash]# yum install liblz4 liblz4-devel Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: centos.excellmedia.net * extras:…
stack512
  • 51
  • 1
  • 1
  • 4
5
votes
0 answers

LZ4 compression library in android app

How do I use LZ4 compression library in my android application... The main issue I'm facing is when i try to export a signed application package, the error which comes is Warning: net.jpountz.util.UnsafeUtils: can't find referenced class…
5
votes
1 answer

How to use LZ4 compression in Linux 3.11

LZ4 algorithm was included in Linux 3.11 kernel Can I compress files with this algorithm without installation of additional packages?
Quiz
  • 514
  • 1
  • 7
  • 13
4
votes
0 answers

liblz4-java*.so files generated in directory other than the one specified by java.io.tmpdir

We are using redisson-3.11.3 in tomcat webapp which has dependency to lz4-java (version 1.4.0) as following: https://github.com/redisson/redisson/blob/redisson-3.11.3/redisson/src/main/java/org/redisson/codec/LZ4Codec.java The tomcat\bin\service.bat…
Hitesh
  • 121
  • 3
  • 14
4
votes
1 answer

How to build flann in windows 10 from source?

I was trying to build flann from source in Windows-10 using cmake. During the installation process it says it cannot find liblz4. I tried two method : 1) So I downloaded the prebuild lz4 from here (https://github.com/lz4/lz4/releases) and placed…
mato
  • 503
  • 8
  • 18
4
votes
2 answers

Spark history logs decompress manually

I have some problems with spark history server and therefore tried to uncompress lz4 logs manually. I installed liblz4-tool and downloaded application log application_1510049252849_0303.lz4. But when uncompressing it with lz4…
St.Antario
  • 26,175
  • 41
  • 130
  • 318
4
votes
0 answers

Compress text file (CSV data) using LZ4 and read it in Spark

I was using the linux command line lz4 to compress the csv file. example:- lz4 input.csv which results in input.csv.lz4 as output But when I try to read the lz4 file in spark shell using following commands it always results in empty result. val…
hitrix
  • 133
  • 3
  • 11
4
votes
1 answer

How to know when the output buffer is too small when decompressing with LZ4?

The documentation of LZ4_decompress_safe says: /*! LZ4_decompress_safe() : compressedSize : is the precise full size of the compressed block. maxDecompressedSize : is the size of destination buffer, which must be already allocated. …
Matthieu M.
  • 287,565
  • 48
  • 449
  • 722
4
votes
4 answers

Decompressing byte[] using LZ4

I am using LZ4 for compressing and decompressing a string.I have tried the following way public class CompressionDemo { public static byte[] compressLZ4(LZ4Factory factory, String data) throws IOException { final int decompressedLength…
nanpakal
  • 971
  • 3
  • 18
  • 37
4
votes
0 answers

Using LZ4 with Apache Spark

I am trying to use LZ4 compression with Apache Spark and I understand that using the regular textFile method should be sufficient. However, if I load my file uncompressed everything works as expected but if I do it lz4-compressed the output ends up…
hveiga
  • 6,725
  • 7
  • 54
  • 78
1
2
3
10 11