Questions tagged [bzip2]

bzip2 is a Unix command used for compression and decompression of files. The main advantage of bzip2 is that it has a high compression ratio with reasonable speed.

bzip2 one of the most widely used free compression programs for the terminal.

It typically compresses files to within 10% to 15% of the best available techniques, whilst being around twice as fast at compression and six times faster at decompression.

The current version is 1.0.6, released 20 Sept 2010.

327 questions
6
votes
3 answers

configure: error: Please reinstall the BZip2 distribution

I am trying to compile php from source on mac with the bzip2 extension and I keep getting an error saying checking for BZip2 in default path... not found I've tried setting the LDFLAGS and CPPFLAGS but that doesn't seem to work. The dylib is in…
kellum42
  • 61
  • 1
  • 3
6
votes
2 answers

Python CRC-32 woes

I'm writing a Python program to extract data from the middle of a 6 GB bz2 file. A bzip2 file is made up of independently decryptable blocks of data, so I only need to find a block (they are delimited by magic bits), then create a temporary…
Lauritz V. Thaulow
  • 49,139
  • 12
  • 73
  • 92
6
votes
1 answer

boost iostreams with bzip2 built from source on windows

Recently, I spent some time working on getting boost version 1.44.0 built on windows with both iostreams support for both zlib & bzip2 compression filters. For a variety of reasons, it was decided to allow boost to build both zlib & bzip2 libraries…
Nathan Ernst
  • 4,540
  • 25
  • 38
6
votes
3 answers

Unable to extract shape_predictor_68_face_landmarks.dat for bz

I am trying to run some face frontalization code (using Python3 on Windows10), the code uses opencv and dlib and requires a file called shape_predictor_68_face_landmarks.dat. The code tries to automatically download it and then unzip it but it fails…
Dan
  • 45,079
  • 17
  • 88
  • 157
6
votes
3 answers

What is the fastest bzip2 decompressor?

Which implementation of bzip2 have the biggest decompression speed? There is a http://bitbucket.org/james_taylor/seek-bzip2/src/tip/micro-bunzip.c which claims Size and speed optimizations by Manuel Novoa III (mjn3@codepoet.org). More…
osgx
  • 90,338
  • 53
  • 357
  • 513
6
votes
1 answer

Piecemeal bzcompression for large files in PHP

Creating bzip2 archived data in PHP is very easy thanks to its implementation in bzcompress. In my present application I cannot in all reason simply read the input file into a string and then call bzcompress or bzwrite. The PHP documentation does…
DroidOS
  • 8,530
  • 16
  • 99
  • 171
6
votes
2 answers

multicpu bzip2 using a python script

I want to quickly bzip2 compress several hundred gigabytes of data using my 8 core , 16 GB ram workstation. Currently I am using a simple python script to compress a whole directory tree using bzip2 and an os.system call coupled to an…
harijay
  • 11,303
  • 12
  • 38
  • 52
6
votes
1 answer

BOOST.IOstreams: trouble to write to bzip2

Hello I am would like to store my data in to bzip2 file using Boost.IOstreams. void test_bzip() { namespace BI = boost::iostreams; { string fname="test.bz2"; { BI::filtering_stream my_filter; …
Arman
  • 4,566
  • 10
  • 45
  • 66
6
votes
3 answers

Read compressed csv file on-the-fly

I have wrote some csv file and compress it, using this code: arr = (0...2**16).to_a File.open('file.bz2', 'wb') do |f| writer = Bzip2::Writer.new f CSV(writer) do |csv| (2**16).times { csv << arr } end writer.close end I want to read…
Israel
  • 3,252
  • 4
  • 36
  • 54
6
votes
2 answers

Decompressing .bz2 stream to file in C#

I'm having real trouble trying to use the .bz2 stuff from the SharpZipLib library and I've not been able to find any help else where. Any help or advice would be much appreciated and if anyone can point me at an existing solution I can learn from…
Mandatory
  • 63
  • 1
  • 3
6
votes
1 answer

Reading memory mapped bzip2 compressed file

So I'm playing with the Wikipedia dump file. It's an XML file that has been bzipped. I can write all the files to directories, but then when I want to do analysis, I have to reread all the files on the disk. This gives me random access, but it's…
MercuryRising
  • 892
  • 1
  • 7
  • 15
5
votes
3 answers

BZ2 compression in C++ with bzlib.h

I currently need some help learning how to use bzlib.h header. I was wondering if anyone would be as so kind to help me figure out a compressToBZ2() function in C++ without using any Boost libraries? void compressBZ2(std::string…
allejo
  • 2,076
  • 4
  • 25
  • 40
5
votes
1 answer

Decompress bzip2 byte array

How would I decompress a bzip2-compressed byte array using boost? I found an example here, but the input is a file hence the use of ifstream. The documentation isn't very clear for me :(. Edit: I'll accept alternatives to boost.
someguy
  • 7,144
  • 12
  • 43
  • 57
5
votes
0 answers

Does bzip2, allow random access decompression at block or stream level?

Some other questions here have been about the issue of being able to compress only a part/chunk of a large file of compressed data. Allowing some sort of "random access decompression". Bzip2 has always been among the recommendations for such a…
humanityANDpeace
  • 4,350
  • 3
  • 37
  • 63
5
votes
2 answers

How to use bzip2 format in iOS? Apple tell me bzBuffToBuffDecompress is private APIs

Today I submit my iOS App to app store, but soon I got a mail from apple, it said that, cannot be posted to the App Store because it is using private or undocumented APIs: Private Symbol References BZ2_bzBuffToBuffDecompress As you know, as…
Tinyfool
  • 1,460
  • 2
  • 18
  • 40
1 2
3
21 22