smp55
smp55

Reputation: 403

Python: Getting uncompressed file size of LZ4 file

I have compressed a large (>10 GB) file using the python lz4 package. I would like to later retrieve the uncompressed file size. Using lz4.frame.open(file).seek(0,2) takes a very long time (~13 s). I created the file using lz4.frame.open(file, 'wb', source_size=size) where size is the uncompressed file size. I cannot find a way to access this value later. lz4.frame.get_frame_info() does not work on lz4.frame.LZ4FrameFile objects, unfortunately. I am using python 3.9.7 and lz4 3.1.3.

Upvotes: 1

Views: 346

Answers (0)

Related Questions