Skip to main content

All Questions

Tagged with
35 questions with no upvoted or accepted answers
6 votes
0 answers
6k views

using boost to compress and decompress gzip streams

I want to use boost to (de)compress gzip streams (not files), so I wrote this code: #include <iostream> #include <boost/iostreams/filtering_streambuf.hpp> #include <boost/iostreams/...
Sinapse's user avatar
  • 792
5 votes
0 answers
2k views

boost::iostreams, gzip files and tellg

I have been using boost::iostreams for reading an uncompressed text file. In my application, I need multiple file handles (stored in a map) to efficiently buffer data for different parameters stored ...
user2661268's user avatar
4 votes
0 answers
521 views

boost gzip_decompressor() Segmentation fault on free()

im using gzip_decompressor() from the boost library but i'm getting a strange Segmentation fault on free(). stringstream gzMessage; stringstream rawMessage; gzMessage << (*iter)->message; ...
Goir's user avatar
  • 71
3 votes
0 answers
536 views

boost: Uncompress http response using gzip failed

I'm trying to uncompress http body response using boost gzip filters. I'm using the standard code example provided everywhere: std::string source = "c:\\install\\data.gz"; std::string destination = "...
Free Handler's user avatar
3 votes
2 answers
2k views

Decompressing gzip file to memory using libarchive

I'm trying to decompress programmatically a gzip file into memory and mimic the command gzip -d file.gz using libarchive project. The file is actually taken from http response with the following ...
Irad K's user avatar
  • 877
2 votes
0 answers
251 views

How to associate stream content with a file name without actually writing the content to disk?

I have an interface that reads files of few types. The interface has read and open methods (and few more). open receives a file name (const char*) and opens the file for reading. Currently I support ...
e271p314's user avatar
  • 3,969
2 votes
0 answers
234 views

how to decompress data to a dynamically allocated memory location

Basically I am trying to decompress some source to the dynamically allocation memory pointed by data pointer. I have following code, I can see copy() is working, but data pointed memory is all 0s. ...
JustDance's user avatar
2 votes
1 answer
1k views

How to keep stream position when using gzstream with gzipped file?

I have to deal with large files compressed with gzipped. I need to access a subset of the lines, not necessarily in order. Thus, I was thinking to go through all the file once while recording the ...
tflutre's user avatar
  • 3,526
2 votes
0 answers
596 views

How to pack http request body using libcurl?

Is it possible to send requests using libcurl in gzipped form? How can I do that?
Illarion Kovalchuk's user avatar
1 vote
0 answers
103 views

Static assert failure while using boost::iostreams::gzip_decompressor()

I have a large compressed file that I have to read and periodically need to change the position in the file when reading, that's why I want to make it seekable. I have two versions to declare the ...
Hayk's user avatar
  • 49
1 vote
1 answer
247 views

Is there way to block uncompress a compressed file using zip, gzip or zlib?

I want to give some sort of an 'offset' where the zlib will start its decompression from at init, I have control over how file is compressed. My question is, is there any block or boundary concepts in ...
Anton Fernando's user avatar
1 vote
0 answers
277 views

Boost gzip filter Segmentation fault (core dumped) error

Using the boost library, I was trying to read the gzip file. but i faced the Segmentation fault error. may i know what the problem is? boost/1.79.0 Ubuntu 20.04.3 LTS #include <boost/filesystem....
mm.'s user avatar
  • 11
1 vote
0 answers
127 views

empty files are being decompressed and extracted

i have compressed few files using following format and filter through libarchive in linux environment arch = archive_write_new(); archive_write_add_filter_gzip(arch); archive_write_set_format_7zip(...
learning_cpp_linux's user avatar
1 vote
1 answer
1k views

zlib gzread function error when read .gz file?

like title, here is my code: int decompress_one_file(char *infilename, char *outfilename) { gzFile infile = gzopen(infilename, "rb"); FILE *outfile = fopen(outfilename, "wb"); if (!infile ...
yasuo's user avatar
  • 11
1 vote
1 answer
1k views

boost::iostreams decompression returns an empty stream

I have a seemingly basic issue that I've been tackling for the past couple of days and can't seem to find an answer for. I have read multiple answers for similar issues, but none seems to work for me. ...
H.OLED's user avatar
  • 11

15 30 50 per page