Alberto1202 / jtar

Automatically exported from code.google.com/p/jtar
0 stars 0 forks source link

Jtar is generating corrupt file tar file for large/big size files #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

I am using Jtar 1.0.2 to compress large video files, When I am trying to add 
11GB file to the tar the jtar is generating the file but the generated tar file 
is corrupt, e.g. I am seeing lot of following types of errors when I am trying 
to verify the generated tar file;

tar: Skipping to next header
tar: Archive contains `\233Íé\020Ó)\230Æ' where numeric major_t value 
expected
tar: Archive contains `\fà\2038\032é\026' where numeric minor_t value expected

tar: Skipping to next header
tar: Archive contains `Ö\0341½\017)\033\212' where numeric major_t value 
expected
tar: Archive contains `\226aLIÇ/nQ' where numeric minor_t value expected

What is the expected output? What do you see instead?
Correctly generated file tar file is expected but jtar is generating corrupt 
file.

What version of the product are you using? On what operating system?

Jtar 1.0.2
CentOS release 5.6 (Final)
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)

Original issue reported on code.google.com by ahs...@gmail.com on 29 Jul 2013 at 9:16

GoogleCodeExporter commented 9 years ago
This is because of the limitations of the tar format.

http://en.wikipedia.org/wiki/Tar_%28computing%29
"This gives a maximum file size of 8 gigabytes on archived files. To overcome 
this limitation, star in 2001 introduced a base-256 coding that is indicated by 
setting the high-order bit of the leftmost byte of a numeric field. GNU-tar and 
BSD-tar followed this idea."

It doesn't warn you when you go over this limit, nor implement the new addition 
to allow files that are larger.

Original comment by rveac...@gmail.com on 27 Sep 2013 at 6:59