Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9248921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:04:00+00:00 2026-06-18T10:04:00+00:00

If I have two text files, one and two , what’s the difference between:

  • 0

If I have two text files, one and two, what’s the difference between:

bz2 one two -c >out.bz2

…and…

cat one two | bzip2 -c >out.bz2

?

Specifically, I’m generating bz2 files using pbzip2, putting them on HDFS, then reading them from pig, and I’m hitting MAPREDUCE-477. I can’t upgrade my hadoop cluster from version 0.20, using a non-parallel bz2 implementation is too slow and I want to use a non-block compression algorithm.

Is there any way I can convert a concatenated bz2 file into a non-concatenated one? Or even, how would I modify pbzip2 so it generates non-concatenated bz2 files?

Thanks –

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T10:04:01+00:00Added an answer on June 18, 2026 at 10:04 am

    Often compression works by replacing patterns with something shorter. For example, if you have “Hello there, goodbye there” then you might replace the second “there” with a reference to the first (where the reference is smaller than the original 5 bytes).

    Now imagine if you have 2 files, one that contains “Hello there” and another that contains “Goodbye there”. If you concatenate then compress, then the compression has more data to work with and can replace the second “there” with a reference to the first. If you compress both files separately and then concatenate this can’t happen.

    Now imagine if you concatenate then compress, such that the second “there” (from the second file) is replaced with a reference to the first “there” (from the first file); and then try to split the compressed data back into 2 compressed files. What you’d end up with is a 2 files where the second file has a reference to something that doesn’t exist in that file, which can’t be decompressed.

    Note: Modern compression techniques are a lot more complex than what I described above – I oversimplified a lot to illustrate.

    If you need to compress and decompress a large amount of data in parallel, then it can’t be done. Instead you need to split the large amount of data into small pieces; so that small piece can be compressed/decompressed separately and many small pieces can be compressed/decompressed in parallel.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the two following text files: First one: chr10 1000 1001 DEL 2.4807
I have two large identical-sized files. One is ASCII plain text, and the other
I want to append two text files together. I have one file with a
I have text files with one source and two destination path..I'm sending those to
I want to compare two text files that i have generated from one of
I have my project writing to two text files. one for input and one
Suppose I have two text files. The first one, called reference.txt has the following
So I have two files, one that contains my text, and another which I
I have two directories of text files. One has the User Description and the
I have two folders, one full of images and another full of text files.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.