I am attempting to compress a string via use of zlib (I've tried this code with current 1.2.3 version of zlib and with zlib 1.1.3). My code works correctly, unless run on a Japanese machine. After compressing a file, I am encrypting it. The decryption is successful, but the call to uncompress returns -3 (Z_DATA_ERROR, meaning the inpu...
I am using eclipse to build application for Blackberry. I attached a zip file with my application. Please help me, I don't know how to retrieve data form the zip file in application development.
...
Hello, i'm writing project that stores data, so i need to compress it. I've tried zlib but it's bottleneck of my project. So maybe there is faster solution. I don't need a great compress ratio, but i'm looking for really fast compression. Are there any other data compression libraries except zlib, that are really free and can be used in ...
Zlib::GzipReader can take "an IO, or -IO-lie, object." as it's input, as stated in docs.
Zlib::GzipReader.open('hoge.gz') {|gz|
print gz.read
}
File.open('hoge.gz') do |f|
gz = Zlib::GzipReader.new(f)
print gz.read
gz.close
end
How should I ungzip a string?
...
Hi,
I'm writing an application that needs to uncompress data compressed by another application (which is outside my control - I cannot make changes to it's source code). The producer application uses zlib to compress data using the z_stream mechanism. It uses the Z_FULL_FLUSH frequently (probably too frequently, in my opinion, but that'...
Hello,
I have a program that links in zlib v1.2.3 and it got the following error:
deflateEnd error 'no msg' kind: 'Z_DATA_ERROR': -3
The program has work successfully with lots of different files to be compressed.
Does anyone know what the 'no msg' of kind Z_DATA_ERROR means and how one would go about debugging it?
Thanks.
-Willia...
I've been building a class to create ZIP files in PHP. An alternative to ZipArchive assuming it is not allowed in the server. Something to use with those free servers.
It is already sort of working, build the ZIP structures with PHP, and using gzdeflate() to generate the compressed data.
The problem is, gzdeflate() requires me to load ...
I have to read some data stored by a third party application in an Acess 2000 database. The vendor is no longer around to ask questions.
One table contains image data that appears to be compressed - because the original application can export the contents of the blob field to an embedded png image in a xls export file.
I have extracte...
I have the following declaration in a Module:
Private Declare Function gzopen Lib "ZLIB.DLL" (ByVal filePath As String, ByVal mode As String) As Long
The following code line in a function fails, with a 'File Not Found: ZLIB.DLL' error:
lGZFileHandle = gzopen(sPath, "rb")
I'm aware that ZLIB doesn't need to be registered. My questi...
Hi guys!
I'm trying since several hours to implement the behaviour of PHP gzinflate() in C. In PHP it's just:
gzinflate($str);
In Python it's:
import zlib
...
return zlib.decompress( decoded_data , -15)
...
But I just don't manage to implement it in C. Can anybody help me with that? I'm really stuck.. I tried to do something with Zlib ...
Trying to start development on a snow leopard machine. Have reinstalled and built ruby and ruby on rails via
hivelogic post
Prior to sorting out my own rails app, I created a test app, and all the expected files showed up. But when I try to run it I get
Missing the Rails 2.2.2 gem. Please gem install -v=2.2.2 rails, update your RA...
UPDATE Sept 11 2010:
A testing platform has been created for this here
HTTP 1.1 definitions of GZIP and DEFLATE (zlib) for some background information:
" 'Gzip' is the gzip format, and 'deflate' is the zlib format. They
should probably have called the second one 'zlib' instead to avoid
confusion with the raw deflate compressed ...
I've got a couple of .tgz-files in my bundle that I want to uncompress and write to file. I've got it working - sort of. The problem is that the file written gets 512 bytes of crap data in front of it, but other than that, the file is uncompressed successfully.
I don't want the crap. If it's always 512 bytes, it is of course easy to j...
In python, I compressed a string using zlib, and then inserted it into a mysql column that is of type blob, using the utf-8 encoding. The string comes back as utf-8, but it's not clear how to get it back into a format where I can decompress it. Here is some pseduo-output:
valueInserted = zlib.compress('a')
= 'x\x9cK\x04\x00\x00b\x00b'
...
Hello,
I'm trying to compile the zpipe.c example in my Linux(Ubuntu 8.04) with gcc, but I'm getting some errors, take a look:
[ubuntu@eeepc:~/Desktop] gcc zpipe.c
/tmp/ccczEQxz.o: In function `def':
zpipe.c:(.text+0x65): undefined reference to `deflateInit_'
zpipe.c:(.text+0xd3): undefined reference to `deflateEnd'
zpipe.c:(.text+0x150...
I'm working on an NMDC client (p2p, DC++ and friends) with Qt. The protocol itself is pretty straightforward:
$command parameters|
Except for compression:
"ZPipe works by sending a command $ZOn| to the client. After $ZOn a ZLib compressed stream containing commands will follow. This stream will end with an EOF that ZLib defines. ...
I'm building a zipper application, but it has a declaration that I want to separate it in another file (compress-file.m), but only when I separate the files I got an error when compiling with a variable, see it:
[ubuntu@eeepc:~/Desktop] make
This is gnustep-make 2.0.2. Type 'make print-gnustep-make-help' for help.
Making all for app Lea...
I'm interesting in experience of others developers with Zlib, and compressing large files, and how it will depends on application processes, is that going to make application slower, or not, or will decrease any other application performance.
If there is any other better solution shoot.
...
I am making a c++ (windows devc++) application which downloads a file using libcurl. I have included the libcurl source code and library to mu executable, so no external dll is required. libcurl requires zlib. But I cannot find out how to include it in the executable. As a result zlib1.dll has to be present. Does anybody know how to incl...
So here's the problem. I have sample.gz file which is roughly 60KB in size. I want to decompress the first 2000 bytes off this file. I am running into CRC check failed error cuz I guess the gzip CRC field appears at the end of file, and it requires the entire gzipped file to decompress. Is there a way to get around this? I dont care abou...