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
0
votes
1 answer

bzip2 on certain files within directory

I have a bzipped folder that contains files within it. The files within it are about 1TB, but I only need about 50GB of them, and if I try to get all the files in the folder, my machine runs out of memory. Here is the command I'm currently…
David542
  • 104,438
  • 178
  • 489
  • 842
0
votes
1 answer

Compressing numbers greater than 256 (1 byte) with BZip2/GZip

My goal is to store hundreds of individual files as efficiently as possible and to read by using Java 1.6. The files consist of an average of 125,000 numbers. Some of the files contain a few hundred numbers, some more than 7,000,000. In most cases,…
0
votes
0 answers

SegFault in ferror on call to BZ2_bzRead in gdb but not in valgrind

I am using a library which seems to read from a compressed file line by line via a buffer. It seems to crash in BZ2_bzRead in gdb but not in valgrind when i have 3 instances of such reader objects reading different files. I have checked that buffer,…
0
votes
2 answers

Python Bzip2 File Hiding as a Zip file

I'm working on an application that needs to scan files from 3rd parties and process them. Sometimes these are compressed, so I've created a function that checks the file extension (tar.gz, gz, zip) and uncompresses accordingly. Some of the .zip…
econgineer
  • 1,117
  • 10
  • 20
0
votes
1 answer

How to get decompression percentage, if possible, from bzcat -vvv

The command bzcat -vvv compressed_file.bz2 > decompressed_file produces in console: compressed_file.bz2: [1: huff+mtf rt+rld {0x7ae7dbbc, 0x7ae7dbbc}] [2: huff+mtf rt+rld {0x0c85da5f, 0x0c85da5f}] [3: huff+mtf rt+rld {0x5e204b89,…
axelbrz
  • 783
  • 1
  • 7
  • 16
0
votes
2 answers

What is the -c option for when bunzipping?

I'm a bit confused with the -c flag using bunzip2. The following line of code works well: ls -l -> -rw-r--r-- 1 root root 163 Oct 25 13:06 access_logs.tar.bz2 bunzip2 -c access_logs.tar.bz2 | tar -t When I would attempt to use this code without…
html_programmer
  • 18,126
  • 18
  • 85
  • 158
0
votes
3 answers

bzip command not working with "tee -a"

I want to redirect stdop of bzip command to logfile using tee command but its not working and giving error for '-a' in tee command. Please see error below, > bzip2 file -c 1> tee -a logfile bzip2: Bad flag `-a' bzip2, a block-sorting file…
user1878934
0
votes
0 answers

File compression using bzip2 library doesn't work

I just wrote a C function that compress a file using bzip2 library APIs. The compression is not working fine. When I decompress the output file using an archiving utility, I'm getting some garbage value along with the actual data. I have done…
0
votes
4 answers

How to merge 2 bzip2'ed files?

I want to merge 2 bzip2'ed files. I tried appending one to another: cat file1.bzip2 file2.bzip2 > out.bzip2 which seems to work (this file decompressed correctly), but I want to use this file as a Hadoop input file, and I get errors about corrupted…
wlk
  • 5,695
  • 6
  • 54
  • 72
0
votes
1 answer

Uncompressed file size in java

I am trying to find the size of uncompressed bz2 files using the following code. However,after running the code, I get the size as 0 bytes. Don't know what is wrong. Could someone please point out. try{ FileInputStream fin = new…
0
votes
1 answer

C# How to get file/ copy file from a bzip2 (.bz2) file without extracting the file

I have a .bz2 compressed file, and i want to copy the inside file to another location, without decompressing it. I use .net 4.5 with C#. i tried like this, but this is for zip files (.zip): using (var zip = ZipFile.Read(_targetPathComplete + "\\" +…
Tommek
  • 11
  • 4
0
votes
1 answer

Unable to decompress Bz2 File has Orginal file using Dotnetzip library

I have File with 10 line, I'm compressing to Bz2 Format, But when i decompress it, I see generated File has only 9 line. There is data loss of 1.5 line. Here is my Code for compressing to Bz2. Im using DotNet zip Library…
user145610
  • 2,949
  • 4
  • 43
  • 75
0
votes
1 answer

How to extract and read a bzip2ed hdf5 in a zipped file in R?

I would like to read a hdf5 file in a zipped file. The issue here is that this hdf5 file is also double zipped as a bzip2ed (.bz2) file. Please refer to the figure shown below. The zip file is "g2_BIOPAR_SWI_201012250000_GLOBE_ASCAT_V2_0_0.ZIP".…
Yu Deng
  • 1,051
  • 4
  • 18
  • 35
0
votes
1 answer

BZIP2 Compress file lags

I am experiencing a problem, when i use Bzip2 to compress files. I feel causses lags on my CS:GO(application) server. Example of command: bzip2 -kqs --fast mg_runordie_final.bsp Once the commend runs I notice an increase in application lag. How…
Neatek
  • 1
  • 1