Solved

ZLib and the file generated

Posted on 2006-07-24
7
469 Views
Last Modified: 2010-04-04
Hello,

I've tried to generate .gz files with the Zlib library given in BDS 2006 and with the Zlib Library 1.2.3 found online, and they don't generate valid .gz files (WinRAR or readgzopen() in PHP, don't want to open generated files).

Someone can help me?
0
Comment
Question by:KCTeam
  • 3
  • 2
  • 2
7 Comments
 
LVL 28

Accepted Solution

by:
2266180 earned 500 total points
ID: 17167473
0
 

Author Comment

by:KCTeam
ID: 17167672
Someone have a solution? :D
0
 
LVL 28

Expert Comment

by:2266180
ID: 17167791
well, I never used gzip but I found this: http://www.sph.sc.edu/comd/rorden/gz.html . they have the app with source and some links that might be helpfull.
there was also some delphi gzip library but all links are broken.
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 14

Expert Comment

by:Hamidreza Vakilian
ID: 17167830
FileTools v.2.3  
By J. Rathlev, IEAP. FileTools is a collection of several objects to copy, pack files (gz, Zip and Zip64 format are supported) and unpack files (only gz format) using a separate thread. For packing and unpacking the zlib-routines from Jean-Loup Gailly and Mark Adler are used.  
 
HRV
0
 
LVL 14

Expert Comment

by:Hamidreza Vakilian
ID: 17167847
0
 

Author Comment

by:KCTeam
ID: 17168067
To Programmer-X : I have to pack and unpack GZip
To ciuly : I have found this page too, dead link doesn't help me ^^
0
 

Author Comment

by:KCTeam
ID: 17168381
I have found the answer alone ^^

I have used the Abrrevia Library!

program Test;

{$APPTYPE CONSOLE}

uses
  SysUtils, Classes, AbGZTyp;

var
  gzFile: TAbGzipArchive;
begin
  //Pack
  gzFile := TAbGzipArchive.Create('test.txt.gz', fmCreate);
  gzFile.load();
  gzFile.AddFiles('test.txt',0);
  gzFile.Save;
  gzFile.Destroy;

  //Unpack
  gzFile := TAbGzipArchive.Create('test.txt.gz', fmOpenRead);
  gzFile.Load();
  gzFile.ExtractAt(0, 'test.unpack.txt'));
  gzFile.Destroy;
  Readln;
end.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question