Sponsored Content
Full Discussion: gzip problem
Top Forums Shell Programming and Scripting gzip problem Post 302089388 by rkrgarlapati on Tuesday 19th of September 2006 02:37:47 AM
Old 09-19-2006
Can i know reason of getting these errors.

$ gzip -t XYZ.txt.gz
gzip: XYZ.txt.gz: invalid compressed data--crc error
gzip: XYZ.txt.gz: invalid compressed data--length error
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

gzip or FTP problem?

I hope someone can help me on this little problem. Bit of background first. I've dumped an Oracle database to a plain text file that I wish to gzip then transfer via ftp to another machine. The dump and gzip runs fine and if I gunzip the file while still in unix the file looks fine. The... (2 Replies)
Discussion started by: DGM
2 Replies

2. UNIX for Dummies Questions & Answers

GZIP help, please!

Gurus, My own stupidity (or ignorance...or both) put me in the situation I am in and I need help please: 1-My shell account (OS: HP UX v11) contains several work directories (/docs, /scripts...) 2-Our sysadmin has implemented aggressive disk quotas so I have to compress the files I put here... (2 Replies)
Discussion started by: alan
2 Replies

3. Programming

problem about using zlib to uncompress gzip in memory

I wrote a function which for uncompressing data for gzip or deflate format using zlib,see followed code; source param is pointed to the compressed data,len param is the size of compressed data, dest param is for returning the address which pointed to the uncompressed data;the last gzip param tell... (0 Replies)
Discussion started by: iwishfine
0 Replies

4. Shell Programming and Scripting

gzip problem

Hi, I am quite new to unix. I need to do the following using gzip. a file suppose abc.gz is in the directory. I need to uncompress it and rename the uncompressed file to ecoes.dat. can anyon please help me in this regard?? (4 Replies)
Discussion started by: UBD
4 Replies

5. Shell Programming and Scripting

Gzip help

Hi Experts!! I was creating a zip file in a server which had zip installed in it. I have another server in which zip is not there and i am instructed to make use of gzip to compress files. I would need your help to know the way to create a gzip file. 1) I do the following to create the zip... (5 Replies)
Discussion started by: ganga.dharan
5 Replies

6. Shell Programming and Scripting

tar and gzip problem

Hi Guys, I have a few files. i want to tar these files and zip it using gzip it. -rw-r----- 1 magesh magesh 12940369 Jul 27 09:26 dcx_imds_c.asc -rw-r----- 1 magesh magesh 1221391 Jul 27 09:27 dcx_imds_h.asc -rw-r----- 1 magesh magesh 1105673 Jul 27 09:27... (6 Replies)
Discussion started by: mac4rfree
6 Replies

7. UNIX for Dummies Questions & Answers

gzip-gunzip a problem

Hi all, i have a gzipped file. <file_name>.gz . when i try gunzip this file i get, invalid compressed data--format violated this file gzipped like gzip -f -S <file_name> 2 > <error_log_file> there is no error in log. it seems that the file gzipped properly. how this ... (3 Replies)
Discussion started by: dummydba
3 Replies

8. UNIX for Advanced & Expert Users

gzip vs pipe gzip: produce different file size

Hi All, I have a random test file: test.txt, size: 146 $ ll test.txt $ 146 test.txt Take 1: $ cat test.txt | gzip > test.txt.gz $ ll test.txt.gz $ 124 test.txt.gz Take 2: $ gzip test.txt $ ll test.txt.gz $ 133 test.txt.gz As you can see, gzipping a file and piping into gzip... (1 Reply)
Discussion started by: hanfresco
1 Replies

9. Shell Programming and Scripting

Help with GZIP

Hi Gurus, I have a requirement to zip a file using gzip and ftp it to target server. I am using a gzip script as below. gzip.sh #!/bin/ksh /usr/bin/gzip -9 $1 Filename for gzip.sh is passed by an application program. so the output for ./gzip.sh Test_YYYYMMDDHHMMSS.txt (file name is... (1 Reply)
Discussion started by: PRVARMA
1 Replies

10. Shell Programming and Scripting

Problem untaring gzip

I'm having an issue extracting my tar.gz file. I am trying to compress all directories based on their last modified date (particularly their last modified month), and move them to a different directory by month. When I run my script everything seems to work ok and my compressed file gets moved to... (4 Replies)
Discussion started by: jrymer
4 Replies
GZENCODE(3)								 1							       GZENCODE(3)

gzencode - Create a gzip compressed string

SYNOPSIS
string gzencode (string $data, [int $level = -1], [int $encoding_mode = FORCE_GZIP]) DESCRIPTION
This function returns a compressed version of the input $data compatible with the output of the gzip program. For more information on the GZIP file format, see the document: GZIP file format specification version 4.3 (RFC 1952). PARAMETERS
o $data - The data to encode. o $level - The level of compression. Can be given as 0 for no compression up to 9 for maximum compression. If not given, the default com- pression level will be the default compression level of the zlib library. o $encoding_mode - The encoding mode. Can be FORCE_GZIP (the default) or FORCE_DEFLATE. Prior to PHP 5.4.0, using FORCE_DEFLATE results in a stan- dard zlib deflated string (inclusive zlib headers) after a gzip file header but without the trailing crc32 checksum. In PHP 5.4.0 and later, FORCE_DEFLATE generates RFC 1950 compliant output, consisting of a zlib header, the deflated data, and an Adler check- sum. RETURN VALUES
The encoded string, or FALSE if an error occurred. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.4.0 | | | | | | | | | | FORCE_DEFLATE now generates RFC 1950 compliant | | | output. | | | | +--------+---------------------------------------------------+ EXAMPLES
The resulting data contains the appropriate headers and data structure to make a standard .gz file, e.g.: Example #1 Creating a gzip file <?php $data = implode("", file("bigfile.txt")); $gzdata = gzencode($data, 9); $fp = fopen("bigfile.txt.gz", "w"); fwrite($fp, $gzdata); fclose($fp); ?> SEE ALSO
gzdecode(3), gzdeflate(3), gzinflate(3), gzuncompress(3), gzcompress(3), ZLIB Compressed Data Format Specification (RFC 1950) . PHP Documentation Group GZENCODE(3)
All times are GMT -4. The time now is 04:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy