Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
288 views

Where in the .XZ file is stored uncompressed file size?

I read XZ's specification and I want to get uncompressed size. There is nothing like this in the footer or header. Am I supposed to: read "Backward Size" from the header calculate: ...
Tom's user avatar
  • 3,034
0 votes
1 answer
4k views

Python Compressed file ended before the end-of-stream marker was reached. But file is not Corrupted

i made a simple request code that downloads a file from a Server r = requests.get("https:.../index_en.txt.lzma") index_en= open('C:\...\index_en.txt.lzma','wb') index_en.write(r.content) ...
Manu Add1's user avatar
1 vote
1 answer
1k views

How to compress/decompress buffer using Fast-LZMA2

I want to compress/decompress a unsigned char buffer using fast-LZMA2 by 7Zip : https://github.com/conor42/fast-lzma2 In the sample there's two function : static int compress_file(FL2_CStream *fcs) { ...
SelectedVertex's user avatar
0 votes
0 answers
54 views

strange behaviour saving file

I use lzmaspec.cpp from 7zip library lzma1900/cpp/7zip/Bundles/Lzmaspec to decompress lzma file. it works fine and save file correctly. when I take main2 function and and make header file to use it in ...
ahmed allam's user avatar
0 votes
1 answer
2k views

7Zip CLI Compress file with LZMA

I try to compress a file in the console with LZMA. 7z a -t7z output input or 7z a -t7z -m0=lzma output input However, I cannot open it on the client. How can compress a file as an LZMA archive in the ...
Miroslav Popov's user avatar
0 votes
1 answer
386 views

How do I create a callback function for the LZMA (7zip) SDK encoder.Code() function?

Below is a small excerpt from a class I'm building for the LZMA (7zip) SDK found here. Everything seems to be working OK for the most part but I'm trying to implement some progress reporting to track ...
Arvo Bowen's user avatar
  • 4,899
0 votes
1 answer
414 views

Use LZMA to codificate a stream of information

The professor gave me a research paper that shows a way to efficiently compress some kind of data. It's not worth to eplain the full algorithm since the question is not about that, I just introduce a ...
LLL's user avatar
  • 648
0 votes
1 answer
579 views

Recreated LZMA differs from the original after 332 bytes - possible?

Today I came across an LZMA-compressed file which was recognized and decompressed by the LZMA SDK. My decompression parameters were lc = lp = 0, pb = 2 with an 8MB dictionary size. When I re-...
Awais Chishti's user avatar
0 votes
1 answer
235 views

lzma is failed to createobjectfunc for rar using c++

There is failed to CreateObject by passing rar(clsid = 23170F69-40C1-278A-1000-000110030000) the lzma sdk is lzma1900. the testing dll(7zra.dll) is compiled by vs2008 nmake in "lzma1900\CPP\7zip\...
Didoo's user avatar
  • 1
1 vote
1 answer
3k views

How to decompress a 7z archive with C# .NET 3.5?

I want my app to use files from a .7z file. I have found some explanations of how to decompress a 7z file. However, they are all about a case I have not yet encountered in the wild: An archive that ...
Raphael Schmitz's user avatar
0 votes
0 answers
271 views

Compressing large file with 7z and unpacking with unzip

I am trying to compress a large file with 7z to achieve a good compression and unpack it with zip to send it to people who do not have 7zip installed. 7zip was selected as it achieves a good ...
scs's user avatar
  • 567
0 votes
1 answer
635 views

Hashing decompressed and compressed files with 7zip sdk - c#

I am using the 7z SDK to compress and decompress files. I want to read the file before compressing it, generate a sha256 hash, write on the file and compress it. When decompressing, I will read the ...
EAzevedo's user avatar
  • 791
5 votes
1 answer
1k views

Mimic 7zip with python

I am using Python 3.6, and currently I subprocess out to my 7zip program to get the compression I need. subprocess.call('7z a -t7z -ms=off {0} *'.format(filename)) I know the zipfile class has ‘...
JabberJabber's user avatar
1 vote
2 answers
2k views

Why doesnt Android compress its APK's with LZ4 / LZMA?

I have been doing some testing on our Unity game and it seems like we could compress the game to half its size if the APK was compressed with LZ4 instead of Zlib. Is there a reason why Android doesnt ...
mikeysee's user avatar
  • 1,743
14 votes
1 answer
58k views

extract 7z file using python 3 [duplicate]

I was trying to decompress a 7z file using python, but I can't seem to figure it out. I figured I could use the lzma module in python 3, but I can't seem to figure it out: I thought it would work ...
code base 5000's user avatar
8 votes
3 answers
3k views

LzmaLib: compress / decompress buffer in C

I'm trying to use LzmaLib's LzmaCompress() and LzmaDecompress() with buffers, adapting the examples provided here. I'm testing with a ~3MB buffer and the compression function seems to work fine (...
karliwson's user avatar
  • 3,455
-3 votes
1 answer
366 views

7-Zip API abort progress

I'm using d7zip for my project, everything worked very well as check list, compression, decompression, progress bar... But I do not know how to abort compression or decompression. I checked the ...
nguyentu's user avatar
3 votes
1 answer
946 views

Compressing folder into 7z in java

I want to compress a folder into .7z extension using java. Iam trying using the below code but it is creating a new file and appending all the source files content into one single file. Can anyone ...
Jagadeeswar's user avatar
0 votes
2 answers
11k views

python extract uncompressed data from 7z-file

I have several csv-files, some of which are compressed but others are not, all in a 7z archive. I want to read the csv files and save the content in a database. However, whenever py7zlib attemts to ...
user3820991's user avatar
  • 2,580
1 vote
0 answers
653 views

Python 2.7 - Need to open .7z file with more files inside for reading

I'm learning with python and I can't find a working solution for my question. I have some .xml files in .7z file. I want to read the .xml files with python but I can't extract them on disk. I tried ...
D. Pol's user avatar
  • 11
1 vote
1 answer
658 views

How to develop incremental compression/decompression in LZMA SDK?

I'm using the LZMA SDK for file compression/decompression (LZMA is the default algorithm used in 7-zip) under Windows 7 (64 bits). The sdk can be found here (source code) http://7-zip.org/sdk.html ...
The Beast's user avatar
  • 1,669
0 votes
1 answer
2k views

Ho to setup and use the LZMA compression algorithm SDK

Making some research on the net, I found that one of the most recent, optimized and high-performance algorithms for data compression, especially in term of compression ratio and decompression time is ...
The Beast's user avatar
  • 1,669
2 votes
2 answers
4k views

Decode an LZMA stream c#

I'm trying to decode an LZMA stream into a stream object so that I can read from it without hogging memory. My input file looks like: some uncompressed data . . some lzma compressed data . . And I'...
maboesanman's user avatar
0 votes
0 answers
1k views

python - extract csv files from 7z

I have lots of csv files contained in different 7z files. I want to find specific csv files in those 7z files and save them decompressed in a different directory. I have tried import os import ...
user3820991's user avatar
  • 2,580
3 votes
0 answers
2k views

Extracting 7z Console SFX (.exe) files using Python without using a subprocess?

I am using python 3.4 I have a crawler that is extracting 7z Console SFX files and I wish to extract them programmatically. Currently I have only been able to do so with a subprocess call: import ...
telemark's user avatar
4 votes
4 answers
52k views

Get Maximum Compression from 7zip compression algorithm

I am trying to compress some of my large document files. But most of files are getting compresses by only 10% maximum. I am using 7zip Terminal Commands. 7z a filename.7z -m0=LZMA -mx=9 -mmt=on -aoa -...
Shilpi Agrawal's user avatar
1 vote
0 answers
930 views

Decode LZMA2 file with .xz extension using 7zip SDK

I need to decode .xz file created with 7zip. Compression alghorithm is LZMA2. How should I use 7zip SDK for C# to solve this problem? I already tried with this code, but it didn't work: var coder = ...
stil's user avatar
  • 5,556
3 votes
0 answers
1k views

error opening archive(7z) files in python when made by 7zip

I have been learning python got the basics down to get better I have been trying to create a program to open archive files, not create just open. I can easily create and open 7z files however when ...
mag pie's user avatar
  • 31
1 vote
1 answer
5k views

Handle 7z Compressed File In VB.NET

I need a specific help about 7z compress file. I hope all knows what is 7z file. It's a compress file format created by 7zip. I have lot's of data I need to give to end user what is 10+ GB (after ...
Zakir_SZH's user avatar
  • 486
0 votes
1 answer
431 views

Pylzma decompression slow down

I am using https://github.com/fancycode/pylzma 's py7zlib.py to decompress a big file with ultra high compression rate. for example, a 7z file contains 450K small files At first, it decommpress well....
jackypan1989's user avatar
  • 2,866
4 votes
1 answer
11k views

How pip install pylzma on windows 7 x64 , python 2.7

I assumed this should be working out of the box, but ... i've pasted pip.log on pastbin the last few lines of error message is e:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe ...
Shuman's user avatar
  • 4,132
0 votes
1 answer
2k views

Java Apache Commons Compress 7zip, corrupt file error

7 zip files (lzma) format, want to compress and encrypt. I want to use Apache Commons Compress. I am using this function, however, the decompressed files are corrupted. Thanks public static void ...
sonik509's user avatar
  • 129
4 votes
1 answer
4k views

C++ LZMA SDK: Uncompress function for LZMA2 compressed file

I am trying to create a function that uncompresses LZAM2 compressed data. I inspired myself from this tutorial which works great for LZMA and I tried to adapt it for LZMA2. I successfully created the ...
Jacob Krieg's user avatar
  • 3,144
0 votes
1 answer
151 views

Does 7Zip SDK support also the container?

I am doing a some research on 7Zip SDK and I haven't find any info about the container. Does 7Zip SDK have the LZMA algorithm only or does it support also the 7Zip container? Zip, for example, keeps ...
Jacob Krieg's user avatar
  • 3,144
-1 votes
2 answers
7k views

How to create *.7z file in Python? [closed]

How to create *.7z file in Python? Please write an small-simple example.
Zakhar Yakovlev's user avatar
2 votes
1 answer
4k views

Decompressing 7z archive using py7zlib gives *** ValueError: data error during decompression

My code is as follows (from here: Example of how to use PyLZMA) import py7zlib ... #filename.__class__ is <class 'django.core.files.uploadedfile.InMemoryUploadedFile'> archive = py7zlib....
A G's user avatar
  • 1,117
2 votes
2 answers
2k views

Is there a good way to handle *fast* compression to LZMA in Java?

The native Java LZMA SDK provided by the 7-Zip author works, but is not nearly fast enough for my needs. The high level implementation just doesn't seem to be able to handle the low level-work needed ...
Dan's user avatar
  • 3,367
6 votes
1 answer
4k views

How to use lzma2 in python code?

I know there is a module called pylzma. But it only support lzma, not lzma2. My current solution is using subprocess.call() to call 7z program. Is there a better way?
Huo's user avatar
  • 808
1 vote
2 answers
5k views

lzma compress/Uncompress from memory c++

I have a code working, but i'm not entirely satisfied of the result, so I figured I could ask some questions here. Here are my two functions : void compress(string nameSrc, string nameDst){ ...
Simon-Okp's user avatar
  • 697
1 vote
0 answers
337 views

Is there any way to keep compressed file extension using "SevenZip.LzmaAlone" class compression?

I'm working on big files compression using Java. It's mandatory (for me) to compress my files unto 7z files (LZMA compression). To do that, I'm using the 7z Java SKD. I'm calling the Decoder.code(...)...
Jsncrdnl's user avatar
  • 3,075
1 vote
1 answer
5k views

Compress a folder recursively as 7z with PyLZMA and py7zlib

Through much trial and error, I've figured out how to make lzma compressed files through PyLZMA, but I'd like to replicate the seemingly simple task of compressing a folder and all of its files/...
Cryptite's user avatar
  • 1,456
17 votes
1 answer
9k views

What's the difference between 7z and lzma compressors?

7-Zip claims using LZMA as the compression algorithm. However, the LZMA SDK comes with two executables, 7zr.exe and lzma.exe, which have different options/switches and which produce different results ...
Carles Sala's user avatar
  • 2,109
24 votes
6 answers
16k views

why is LZMA SDK (7-zip) so slow

I found 7-zip great and I will like to use it on .net applications. I have a 10MB file (a.001) and it takes: 2 seconds to encode. Now it will be nice if I could do the same thing on c#. I have ...
Tono Nam's user avatar
  • 36k
4 votes
1 answer
4k views

How to compress a Folder uses lzma sdk?

http://www.7-zip.org/sdk.html I can uses it compress a file, but can not find function of compress a Folder
babaloveyou's user avatar
4 votes
1 answer
4k views

How do I create 7-Zip archives containing multiple files with .NET?

Here in this post it is mentioned how to Compress and Decompress files using LZMA SDK. Here is the Code : public static void CompressFileLZMA(string inFile, string outFile) { Int32 dictionary = ...
Writwick's user avatar
  • 2,163
33 votes
4 answers
57k views

How to use the 7z SDK to compress and decompress a file

According to this link How do I create 7-Zip archives with .NET? , WOPR tell us how to compress a file with LMZA (7z compression algorithm) using 7z SDK ( http://www.7-zip.org/sdk.html ) using ...
Djax's user avatar
  • 431
3 votes
3 answers
3k views

Using LZMA SDK in C++

Can i use LZMA SDK in my application without using any dll libraries such as 7z.dll or 7za.dll so that my application's executable file should not have any dependencies? If it is impossible where can ...
Vitaly's user avatar
  • 617
17 votes
6 answers
45k views

How to use LZMA SDK to compress/decompress in Java

http://www.7-zip.org/sdk.html This site provide a LZMA SDK for compress/decompress files, I would like to give it a shot but I am lost. Anyone got experience on this? Or a tutorial? Thanks.
lamwaiman1988's user avatar
1 vote
3 answers
2k views

Make Custom Self-Extractor

I'll explain what I want, and then I'll explain how I'm trying to achieve it. I want to know if I'm gonig about this the right way, or if there is something much easier. What I want: a self-...
Brent Arias's user avatar
  • 30.1k
4 votes
5 answers
5k views

LZMA Or 7zip in Delphi

Is there any Library in Delphi to handle LZMA (or 7zip)files including creating self extracting EXEs There are some sources code at 7zip.orgin (c++ java c#) but i want them in delphi BUT i want ...
Vibeeshan Mahadeva's user avatar