Questions tagged [bzip]

Anything related to bzip file compressor (legacy). DO NOT use to mark questions related to the newer bzip2 compressor, use bzip2 tag instead.

Anything related to bzip file compressor (legacy). DO NOT use to mark questions related to the newer bzip2 compressor, use bzip2 tag instead.

See the Wikipedia page on bzip2.

27 questions
297
votes
8 answers

Utilizing multi core for tar+gzip/bzip compression/decompression

I normally compress using tar zcvf and decompress using tar zxvf (using gzip due to habit). I've recently gotten a quad core CPU with hyperthreading, so I have 8 logical cores, and I notice that many of the cores are unused during…
user1118764
  • 9,255
  • 18
  • 61
  • 113
11
votes
2 answers

Only decompress a specific bzip2 block

Say I have a bzip2 file (over 5GB), and I want to decompress only block #x, because there is where my data is (block is different every time). How would I do this? I thought about making an index of where all the blocks are, then cut the block I…
user163365
  • 1,317
  • 9
  • 14
10
votes
2 answers

Is it possible to parallelize bz2's decompression?

I am using pythons bz2 module to generate (and compress) a large jsonl file (bzip2 compressed 17GB). However, when I later try to decompress it using pbzip2 it only seems to use one CPU-core for decompression, which is quite slow. When i compress it…
worenga
  • 5,776
  • 2
  • 28
  • 50
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
2
votes
2 answers

Open3.popen3 function to open bz, gz, and txt files errors with 'No such file or directory' or 'not opened for reading'?

I'm trying to write a utility function that will open three different types of files: .bz2, .gz, and .txt. I can't just use File.read because it gives me garbage back for the compressed files. I'm trying to use Open3.popen3 so that I can give it a…
Denise Mauldin
  • 5,397
  • 5
  • 32
  • 51
2
votes
1 answer

Sending gzip compressed data through TCP socket in Python

I'm creating an HTTP server in Python without any of the HTTP libraries for learning purposes. Right now it can serve static files fine. The way I serve the file is through this piece of code: with open(self.filename, 'rb') as f: src =…
user5508097
  • 23
  • 1
  • 4
2
votes
1 answer

ZIPX Compression Method 2048

I have a zipx file that is using compression method 2048. I know that the ZIPX format uses one of four compression methods (LZMA, BZIP2, PPMd, WavPack). The compression method number associated with each of these methods is: LZMA (14) BZIP2…
Adam
  • 29
  • 2
2
votes
3 answers

parsing large compressed xml files, python

file = BZ2File(SOME_FILE_PATH) p = xml.parsers.expat.ParserCreate() p.Parse(file) Here's code that tries to parse xml file compressed with bz2. Unfortunately it fails with a message: TypeError: Parse() argument 1 must be string or read-only…
Marcin
  • 7,874
  • 7
  • 45
  • 49
1
vote
4 answers

tradeoffs of different compression algorithms

What are the tradeoffs of the different compression algorithms? The purpose is backup, transfer & restore. I don't care about popularity, as long as a mature enough tool exists for unix. I care about time cpu memory compression level the…
flybywire
  • 261,858
  • 191
  • 397
  • 503
1
vote
1 answer

How do I bzip archive specific files recursively in a directory without archiving the files themselves in bash?

Just as the title says, I'm trying to create a script that will take a directory as input bzip the files within the directory while preserving the directories themselves into another directory taken as input. So, for example: $ tree…
Phase
  • 13
  • 2
1
vote
1 answer

Recompressing Compressed Files

Can you keep sending the output of BZip2 (or any compression software) back through the compression process over and over again to make the output files smaller and smaller? Can you compress a file using one software (BZip2) that was already…
Mylas
  • 11
  • 1
1
vote
1 answer

How to download bzip2 sources for linux?

I used to download http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz But now http://www.bzip.org/ does not exists anymore.
karelv
  • 756
  • 9
  • 20
1
vote
0 answers

unzipping .nc files from many BZIP folders in R

I’m trying to extract .nc files from PowerArchiver BZIP in R from many different folders, would anyone be able to help me do this? I have a code to extract and select the files but when I try and unzip using codes provided in previous stack…
Sophie
  • 11
  • 2
1
vote
2 answers

Unzip a single file in a tbz archive

I have the following archived directory: itunes20140618.tbz I want to extract single file from it called: itunes20140618/video How would I do this? So far, I am doing $ bzip2 -d /tmp/itunes20140618.tbz But it seems to create a tar directory of…
David542
  • 104,438
  • 178
  • 489
  • 842
1
vote
1 answer

TokyoCabinet's Ruby C interface can't bzip

I'm using the Ruby official Ruby C interface and am not able to bzip working. It did build with bzip support, ./configure said: checking bzlib.h usability... yes checking bzlib.h presence... yes checking for bzlib.h... yes So I wrote this example…
pushcx
  • 571
  • 3
  • 12
1
2