델파이의 7-Zip DLL을 사용하고 싶지만 괜찮은 문서 나 예제를 찾을 수 없었습니다. 누구든지 델파이에서 7-Zip DLL을 사용하는 방법을 알고 있습니까?Delphi에서 7-Zip을 사용 하시겠습니까?
답변
릴리스 1.102에서 JEDI Code Library은 을 JclCompression 단위로 내장합니다. 그래도 아직 사용하지 않았습니다.
zip 및 압축 해제 용으로 7Zip을 사용하려는 경우 TZip 구성 요소를 살펴보십시오. Zipper.pas 파일에서 찾을 수있는 자신의 목적을 위해 작은 래퍼를 작성했습니다. 재사용 해주십시오.
제다이 코드 라이브러리의 많은으로, 올리버 GIESEN의 대답에 확장, 나는 어떤 점잖은 문서를 찾을 수 없습니다, 그러나 이것은 나를 위해 작동 :
uses
JclCompression;
procedure TfrmSevenZipTest.Button1Click(Sender: TObject);
const
FILENAME = 'F:\temp\test.zip';
var
archiveclass: TJclDecompressArchiveClass;
archive: TJclDecompressArchive;
item: TJclCompressionItem;
s: String;
i: Integer;
begin
archiveclass := GetArchiveFormats.FindDecompressFormat(FILENAME);
if not Assigned(archiveclass) then
raise Exception.Create('Could not determine the Format of ' + FILENAME);
archive := archiveclass.Create(FILENAME);
try
if not (archive is TJclSevenZipDecompressArchive) then
raise Exception.Create('This format is not handled by 7z.dll');
archive.ListFiles;
s := Format('test.zip Item Count: %d'#13#10#13#10, [archive.ItemCount]);
for i := 0 to archive.ItemCount - 1 do
begin
item := archive.Items[i];
case item.Kind of
ikFile:
s := s + IntToStr(i+1) + ': ' + item.PackedName + #13#10;
ikDirectory:
s := s + IntToStr(i+1) + ': ' + item.PackedName + '\'#13#10;//'
end;
end;
if archive.ItemCount > 0 then
begin
// archive.Items[0].Selected := true;
// archive.ExtractSelected('F:\temp\test');
archive.ExtractAll('F:\temp\test');
end;
ShowMessage(s);
finally
archive.Free;
end;
end;
7 우편 플러그인 API
우편 및 7Z, Synopse을 시도 : http://synopse.info/forum/viewtopic.php?pid=163
Synopse가 7zip을 지원하는 것처럼 보이지 않습니다. – hikari
델파이는 지금이 XE2에서 TZipFile 네이티브 크로스 플랫폼 우편 지원 :
How to extract zip files with TZipFile in Delphi XE2 and FireMonkey
나는 많은 솔루션을 시도하고 문제가 있었다,이 하나했다.
다운로드 https://github.com/zedalaye/d7zip 7z.dll 및 sevenzip.pas를 프로젝트 diroctory에 복사하고 프로젝트에 sevenzip.pas를 추가하십시오.
그런 다음 압축을 해제하려면이 옵션을 사용할 수 있습니다
using sevenzip;
procedure Unzip7zFile (zipFullFname:string);
var
outDir:string;
begin
with CreateInArchive(CLSID_CFormat7z) do
begin
OpenFile(zipFullFname);
outDir := ChangeFileExt(zipFullFname, '');
ForceDirectories (outDir);
ExtractTo(outDir);
end;
end;
사용법 : 모든 압축 된 객체가 메모리에 맞지 않을 경우 잘 작동 TZip
Unzip7zFile(ExtractFilePath(Application.ExeName) + 'STR_SI_FULL_1000420.7z');
- 1. facebook delphi에서 채팅 하시겠습니까?
- 2. Delphi에서 IME 이름 사용
- 3. Delphi에서 SQL Azure에 연결 하시겠습니까?
- 4. Delphi에서 Read Only TDBGrid/TwwDBGrid 셀을 사용 하시겠습니까?
- 5. OpenIL (Devil) : Delphi에서 ilLoadL 사용
- 6. Delphi에서 ECO 사용 안 함
- 7. Delphi에서 SQL 2008의 테이블 변수 사용
- 8. Windows XP에서 프로그래밍 방식으로 기본 코드 페이지를 변경 하시겠습니까? (Delphi에서)
- 9. Delphi에서 Indy가있는 Google OAuth
- 10. Delphi에서 내장 데이터베이스 보안/암호화
- 11. Delphi에서 Wifi로 작업하고 싶습니다. 방법?
- 12. WMF 그림을 Delphi에서 GIF 또는 PNG로 변환하려면 어떻게해야합니까?
- 13. Delphi에서 [Uni] SynEdit에서 SyntaxMemo SDK
- 14. Delphi에서 암호 암호화
- 15. 브라우저가 delphi에서 개발 되었습니까?
- 16. Delphi에서 포인터로 DLL 호출
- 17. OleVariant를 Delphi에서 Object로 변환합니다.
- 18. Delphi에서 OutputDebugString은 안전한 스레드입니까?
- 19. Delphi에서 Asn1 구현
- 20. Delphi에서 SharePoint 개체에 액세스
- 21. Delphi에서 TCustomComboBox 자손 만들기
- 22. Delphi에서 함수 오버라이드
- 23. Delphi에서 MySQL 결과 필터링
- 24. Delphi에서 System.IsConsole이 언제 사용됩니까?
- 25. Delphi에서 IntraWeb을위한 대안?
- 26. Delphi에서 옵션 양식 만들기
- 27. Delphi에서 OutputDebugString 호출 디버깅
- 28. Delphi에서 Java와 유사한 컬렉션
- 29. Delphi에서 OAuth 공급자 구현
- 30. Delphi에서 벡터 클래스 구현?
. 그렇지 않으면 당신은 약간 꼬집어 있습니다. 300 메가 비트의 zip을 만든 다음, 그 300 메가 바이트의 zip 중 90 개를 TZip이있는 다른 zip으로 압축하면 재미있는 시간을 갖게됩니다. –