마음의 안정을 찾기 위하여 - 델파이 ZLib Version 1.2.3과 사용 예
1948859
173
348
관리자새글쓰기
태그위치로그방명록
별일없다의 생각
dawnsea's me2day/2010
색상(RGB)코드 추출기(Color...
Connection Generator/2010
최승호PD, '4대강 거짓말 검...
Green Monkey**/2010
Syng의 생각
syng's me2DAY/2010
천재 작곡가 윤일상이 기획,...
엘븐킹's Digital Factory/2010
델파이 ZLib Version 1.2.3과 사용 예
Delphi/컴퍼넌트, 솔루션 소개 | 2007/12/26 16:10

델파이용 압축 라이브러리 (ZLibEx)의 사용 예와 ZLib

- zlib version 1.2.3 for delphi 5, 6, and 7
- should also work with delphi 8, 2005, and 2006
- now supports simple gzip files
- includes zlib source code and c++ builder 6 project files (c++ builder 6 was used to compile c source into object files)

라이브러리 다운로드 : http://www.base2ti.com.

uses ZLibEx;

Procedure CompressFile(Const inFile, outFile: String);
Var
  zStream   : TzCompressionStream;
  inStream  : TFileStream;
  outStream : TFileStream;
  size      : Cardinal;
Begin
  inStream  := TFileStream.Create(inFile, fmOpenRead);
  outStream := TFileStream.Create(outFile, fmCreate);
  Try
    size := inStream.Size;
    outStream.Write(size, SizeOf(Cardinal));
    Try
      zStream := TzCompressionStream.Create(outStream);
      zStream.CopyFrom(inStream, 0);
    Finally
      zStream.Free;
    End;
  Finally
    outStream.Free;
    inStream.Free;
  End;
End;
Procedure DecompressFile(Const inFile, outFile: String);
Var
  zStream   : TzDecompressionStream;
  inStream  : TFileStream;
  outStream : TFileStream;
  size      : Cardinal;
Begin
  inStream  := TFileStream.Create(inFile, fmOpenRead);
  outStream := TFileStream.Create(outFile, fmCreate);
  Try
    inStream.Read(size, SizeOf(Cardinal));
    Try
      zStream := TzDecompressionStream.Create(inStream);
      outStream.CopyFrom(zStream, size);
    Finally
      zStream.Free;
    End;
  Finally
    outStream.Free;
    inStream.Free;
  End;
End;

2007/12/26 16:10 2007/12/26 16:10
Article tag list Go to top
View Comment 0
Trackback URL :: 이 글에는 트랙백을 보낼 수 없습니다
 
 
 
 
: [1] ... [623][624][625][626][627][628][629][630][631] ... [855] :
«   2021/10   »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
전체 (855)
출판 준비 (0)
My-Pro... (41)
사는 ... (492)
블로그... (22)
My Lib... (32)
게임 ... (23)
개발관... (3)
Smart ... (1)
Delphi (75)
C Builder (0)
Object... (0)
VC, MF... (9)
Window... (1)
Open API (3)
Visual... (0)
Java, JSP (2)
ASP.NET (0)
PHP (4)
Database (12)
리눅스 (28)
Windows (23)
Device... (1)
Embedded (1)
게임 ... (0)
Web Se... (2)
Web, S... (19)
잡다한... (5)
프로젝트 (0)
Personal (0)
대통령... (9)
Link (2)