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
4
votes
2 answers

How to extract bz2 file in php

I have exported an SQL file from a database by using phpmyadmin. The file is named final.sql.bz2 and then I uploaded it onto my Live Server. The question is, how could I extract that file by using PHP code? I tried to search for that on google, but…
Mark Richards
  • 434
  • 1
  • 8
  • 24
4
votes
1 answer

Javascript proof-of-concept of GIF (re)compression

My program Precomp can be used to further compress already compressed file formats like GIF, PNG, PDF, ZIP and more. Roughly summarized, it does this by decompressing the compressed streams, recompressing them and storing the differences between the…
schnaader
  • 49,103
  • 10
  • 104
  • 136
4
votes
1 answer

hadoop bz2 library in Spark job fails when running on multiple cores

I currently have a problem with Spark and reading bz2 files. I'm using Spark 1.2.0 (prebuilt for hadoop 2.4, but the files are currently read only locally). For testing there are ~1500 files, each file about 50KB size. The following script…
siggi_42
  • 143
  • 2
  • 7
4
votes
3 answers

unpack bz2 url without temporary file in python

I want to unpack data from bz2 url directly to target file. Here is the code: filename = 'temp.file' req = urllib2.urlopen('http://example.com/file.bz2') CHUNK = 16 * 1024 with open(filename, 'wb') as fp: while True: chunk =…
4
votes
1 answer

Why is seeking from the end of a file allowed for BZip2 files and not Gzip files?

The Question I am parsing large compressed files in Python 2.7.6 and would like to know the uncompressed file size before starting. I am trying to use the second technique presented in this SO answer. It works for bzip2 formatted files but not gzip…
skrrgwasme
  • 9,358
  • 11
  • 54
  • 84
4
votes
2 answers

TAR file format issue

It is unclear to me, what is a correct .tar file format, as I am experiencing proper functionality with three scenarios (see below). Based on .tar specification I have been working with, the magic field (ustar) is null-terminated character string…
Ωmega
  • 42,614
  • 34
  • 134
  • 203
4
votes
1 answer

C BZ2_bzDecompress way slower than bzip2 command

I'm using mmap/read + BZ2_bzDecompress to sequentially decompress a large file (29GB). This is done because I need to parse the uncompressed xml data, but only need small bits of it, and it seemed like it would be way more efficient to do this…
griffin
  • 1,261
  • 8
  • 24
4
votes
2 answers

.bz2 pipe extract with Node.js?

I want to extract .tar.bz2 like the following with tar.gz with node.js: request.get("localhost/file.tar.gz") .pipe(zlib.createGunzip()) .pipe(tar.Extract({path: "./test"})) .on("error", function(err){ console.log("Error on extract",…
remoe
  • 35
  • 1
  • 4
4
votes
2 answers

install error of CASAVA on Ubuntu 12.04LTS

I am trying to install CASAVA Bcl2Fastq 1.8.3 (developed for CentOS) on Ubuntu 12.04 LTS. However, I got an error message "No support for gzip compression" and the install failed. Luckily, I found a solution for this problem: sudo ln -s…
Runner
  • 365
  • 1
  • 5
  • 21
4
votes
3 answers

Parallel BZip2 Compression

i'm using Apache Commons Compress for Java to compress multiple log files to a single tar.bz2 archive. However, it takes really long (> 12 hours) to compress, because i compress around 20GB of files a day. As this library compresses files…
Stefan
  • 2,028
  • 2
  • 36
  • 53
4
votes
1 answer

Using bzip2 low-level routines to compress chunks of data

The Overview I am using the low-level calls in the libbzip2 library: BZ2_bzCompressInit(), BZ2_bzCompress() and BZ2_bzCompressEnd() to compress chunks of data to standard output. I am migrating working code from higher-level calls, because I have…
Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
4
votes
2 answers

Error installing Nodejs on CentOS 5 server - no module bz2

I'm trying to get NodeJS installed on my CentOS 5 server I got Python 2.6 installed, and I got ./configure to work, but when I run the make command I get this result [root@catch24dev node-v0.8.6]# make make -C out BUILDTYPE=Release…
Marius Miliunas
  • 1,023
  • 18
  • 34
3
votes
2 answers

How to save a csv as bzip2 in R, either within fwrite or after saving the csv using fwrite

I have code which uses write.csv to save a large number of files in bzip2 format. Here's a small reproduceable example: df <- data.frame(A = rnorm(100000), B = rnorm(100000), C = rnorm(100000)) write.csv(df, file = bzfile('df.csv.bzip2')) I want to…
jruf003
  • 980
  • 5
  • 19
3
votes
1 answer

What's the fastest and most memory efficient BZip2 decompression tool to use in Java

Currently using the Apache Commons Compress package which uses about 60% of the overall heap and takes around 6 minutes to decompress about 500 files each 4-5Mb when decompressing BZip2 files. My main problem is I can't find anything to compare this…
3
votes
1 answer

Official bzip2 site is offline

Recently, I found out, that the official bzip page has changed (http://www.bzip.org/index.html). I had a script, which took the source code from bzip.org and compiled it. Now, the source code and all other stuff are not anymore on this site. I…
devopsfun
  • 1,368
  • 2
  • 15
  • 37