| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > Delphi: Общие вопросы > Zip or Rar |
| Автор: X-Vlad 19.3.2004, 13:42 |
| Привет всем. Ребята помогите плз. Срочнно нужен компонент для упаковки в архив zip или rar именно для упаковки - компонент "Unrar" неподходит..... Горит проект.... Зарание благодарен. |
| Автор: bartram 19.3.2004, 13:45 |
| Есть коипоненты ZipTv поищи в интернете правда они платные. Выложу их на сайте дам ссылку |
| Автор: X-Vlad 19.3.2004, 13:51 |
| bartram спасибо.... качну... может есть бесплатные? |
| Автор: X-Vlad 19.3.2004, 14:53 |
| нашол компонент называется "ZipForge" - много возможностей и наворотов. Бесплатный Для Delphi 4,5,6,7, CBuilder 4,5,6 |
| Автор: NiJazz 19.3.2004, 16:48 |
| X-Vlad Где нашёл? Оставь ссылку. |
| Автор: Akella 19.3.2004, 17:01 |
| Мы ждем |
| Автор: z-END 19.3.2004, 17:34 |
| Мож немного не втему, на диске с дельфями есть папка Extras и в ней есть такая штука как VCLZip и VCLUnZip - т.е. архиватор и разархиватор... если у кого нет могу на почту скинуть... правда ща посомтрел исходники ах для 3 дельфей... ну все равно думаю больших проблемм передевлть ни у кого небудет |
| Автор: X-Vlad 19.3.2004, 17:56 |
| Сорри что так долго - на обед бегал ... http://www.torry.net/vcl/compress/std/zf.zip |
| Автор: Alex101 19.3.2004, 18:32 |
| А запускать сам архиватор с параметрами не подходит? |
| Автор: Vit 19.3.2004, 19:50 |
| Пакет бесплатных компонентов с исходниками Abbrevia, скачать можно с www.torry.net поддерживает zip и cab |
| Автор: pascal 19.3.2004, 20:17 |
| у меня есть компонет VCLZIP зделан он был поначалу для delphi 1, потом дошло до delphi 5, но под delphi 6 не работало, пришлось хорошо постараться чтобы привести его в себя, подом до delphi 7 довёл... вобщем могу поделиться если кому надо, так как в инете я не видел этот компонент... уникальность в том что он 100% в виде пасовских исходников... TVCLZip = class(TVCLUnZip) private FPackLevel: Integer; FRecurse: Boolean; FDispose: Boolean; FStorePaths: Boolean; FRelativePaths: Boolean; FStoreVolumes: Boolean; FZipAction: TZipAction; FBlockSize: LongInt; FMultiZipInfo: TMultiZipInfo; FOnStartZipInfo: TStartZipInfo; FOnStartZip: TStartZipEvent; FOnDisposeFile: TDisposeEvent; FOnEndZip: TEndZipFileEvent; FOnDeleteEntry: TDeleteEvent; FOnNoSuchFile: TNoSuchFileEvent; AmountWritten: LongInt; AmountToWrite: LongInt; UsingTempFile: Boolean; CreatingSFX: Boolean; SFXStubFile: TLFNFileStream; protected { Protected declarations } zfile: TStream; { output compression file } IFile: TStream; { input file to compress } mfile: TStream; { temporary file during spanned file creation } IFileName: String; isize: LongInt; tmpfiles: TSortedZip; tmpfiles2: TSortedZip; tmpecrec: TEndCentral; tmpfile_info: TZipHeaderInfo; tmpZipName: String; mZipName: String; Deleting: Boolean; FileBytes: LongInt; SaveNewName: String; static_ltree: static_ltree_type; static_dtree: static_dtree_type; bl_count: array [0..MAX_ZBITS] of WORD; base_dist: array [0..D_CODES-1] of Integer; length_code: array [0..MAX_MATCH-MIN_MATCH] of Byte; dist_code: array [0..511] of Byte; base_length: array [0..LENGTH_CODES-1] of Integer; TRInitialized: Boolean; {$IFDEF WIN16} windowObj: TkpHugeByteArray; prevObj: TkpHugeWordArray; headObj: TkpHugeWordArray; l_bufObj: TkpHugeByteArray; d_bufObj: TkpHugeWordArray; flag_bufObj: TkpHugeByteArray; {$ENDIF} window: windowtypePtr; prev: prevtypePtr; head: headtypePtr; l_buf: l_buftypePtr; d_buf: d_buftypePtr; flag_buf: flag_buftypePtr; function zfwrite(buf: BytePtr; item_size, nb: Integer): LongInt; function zencode(c: Byte): Byte; function file_read( w: BytePtr; size: usigned ): LongInt; procedure CreateTempZip; function Deflate: LongInt; function ProcessFiles: Integer; function AddFileToZip( FName: String ): Boolean; {procedure MoveExistingFiles;} procedure MoveFile( Index: Integer ); procedure MoveTempFile; procedure StaticInit; procedure CryptHead( passwrd: String ); procedure SetZipName( ZName: String ); override; function GetIsModified: Boolean; procedure SetMultiZipInfo(Value: TMultiZipInfo); function GetCheckDiskLabels: Boolean; override; procedure SetStoreVolumes( Value: Boolean ); function GetMultiMode: TMultiMode; override; procedure SetCheckDiskLabels( Value: Boolean ); override; procedure SetMultiMode( Value: TMultiMode ); override; function DiskRoom: LongInt; function RoomLeft: LongInt; procedure NextPart; procedure LabelDisk; procedure SetPathname(Index: Integer; Value: TZipPathname); procedure SetFilename(Index: Integer; Value: String); procedure SetStorePaths(Value: Boolean); procedure SetRelativePaths(Value: Boolean); procedure Loaded; override; public { Public declarations } constructor Create( AOwner: TComponent ); override; destructor Destroy; override; function Zip: Integer; function DeleteEntries: Integer; procedure SaveModifiedZipFile; function ZipFromStream( theStream: TStream; FName: String ): Integer; function FixZip( InputFile, OutputFile: String): Integer; procedure MakeSFX( SFXStub: String; ModHeaders: Boolean ); property FileComment[Index: Integer]: String read GetFileComment write SetFileComment; property ZipComment: String read GetZipComment write SetZipComment; property IsModified: Boolean read GetIsModified; property CheckDiskLabels: Boolean read GetCheckDiskLabels write SetCheckDiskLabels; property MultiMode: TMultiMode read GetMultiMode write SetMultiMode; property Pathname[Index: Integer]: TZipPathname read GetPathname write SetPathname; property Filename[Index: Integer]: String read GetFilename write SetFilename; published { Published declarations } property PackLevel: Integer read FPackLevel write FPackLevel default 6; property Recurse: Boolean read FRecurse write FRecurse default False; property Dispose: Boolean read FDispose write FDispose default False; property StorePaths: Boolean read FStorePaths write SetStorePaths default False; property RelativePaths: Boolean read FRelativePaths write SetRelativePaths default False; property StoreVolumes: Boolean read FStoreVolumes write SetStoreVolumes default False; property ZipAction: TZipAction read FZipAction write FZipAction default zaUpdate; property MultiZipInfo: TMultiZipInfo read FMultiZipInfo write SetMultiZipInfo; { Event Properties } property OnStartZip: TStartZipEvent read FOnStartZip write FOnStartZip; property OnStartZipInfo: TStartZipInfo read FOnStartZipInfo write FOnStartZipInfo; property OnEndZip: TEndZipFileEvent read FOnEndZip write FOnEndZip; property OnDisposeFile: TDisposeEvent read FOnDisposeFile write FOnDisposeFile; property OnDeleteEntry: TDeleteEvent read FOnDeleteEntry write FOnDeleteEntry; property OnNoSuchFile: TNoSuchFileEvent read FOnNoSuchFile write FOnNoSuchFile; end; TVCLUnZip = class(TComponent) private { Private declarations } FZipName: String; FDestDir: String; FSortMode: TZipSortMode; FReCreateDir: Boolean; FOverwriteMode: TUZOverwriteMode; FFilesList: TStrings; FDoAll: Boolean; FPassword: String; FIncompleteZipMode: TIncompleteZipMode; FKeepZipOpen: Boolean; FDoProcessMessages: Boolean; FNumDisks: Integer; FRetainAttributes: Boolean; FThisVersion: Integer; { Event variables } FOnStartUnzipInfo: TStartUnzipInfo; FOnStartUnZip: TStartUnZipEvent; FOnEndUnZip: TEndUnZipEvent; FOnPromptForOverwrite: TPromptForOverwrite; FOnBadPassword: TBadPassword; FOnBadCRC: TBadCRC; FOnInCompleteZip: TInCompleteZip; { Decrypt } protected FOnFilePercentDone: TFilePercentDone; FOnTotalPercentDone: TTotalPercentDone; FOnSkippingFile: TSkippingFile; FOnGetNextDisk: TGetNextDisk; FArchiveStream: TStream; FBusy: Boolean; FRootDir: String; ArchiveIsStream: Boolean; FCheckDiskLabels: Boolean; FMultiMode: TMultiMode; file_info: TZipHeaderInfo; files: TSortedZip; sortfiles: TSortedZip; filesDate: TDateTime; ZipIsBad: Boolean; CurrentDisk: Integer; theZipFile: TStream; Crc32Val: LongInt; lrec: local_file_header; crec: central_file_header; ecrec: TEndCentral; ZipCommentPos: LongInt; Key: DecryptKey; CancelOperation: Boolean; ZipStream: TStream; StreamZipping: Boolean; Fixing: Boolean; DR: Boolean; TotalUncompressedSize: Comp; TotalBytesDone: Comp; {$IFDEF DEMO2} OpCount: Integer; DemoApp: Boolean; HowOften: Integer; {$ENDIF} procedure OpenZip; procedure CloseZip; function GetCount: Integer; procedure GetFileInfo; function GetZipName: String; procedure SetZipName( ZName: String ); virtual; procedure SetArchiveStream( theStream: TStream ); function GetDestDir: String; procedure SetDestDir( DDir: String ); procedure SetRootDir(Value: String); function UnZipFiles( zip_in_file: TStream ): Integer; function UpdCRC(Octet: Byte; Crc: LongInt) : LongInt; function SwapDisk( NewDisk: Integer): TStream; procedure SetFileComment( Index: Integer; theComment: String ); procedure SetZipComment( theComment: String ); procedure WriteNumDisks( NumberOfDisks: Integer ); procedure NewDiskEvent( Sender: TObject; var S: TStream ); procedure SetThisVersion( v: Integer ); function GetCheckDiskLabels: Boolean; virtual; procedure SetCheckDiskLabels( Value: Boolean ); virtual; { GetMultiMode and SetMultiMode added 3/10/98 for 2.03} function GetMultiMode: TMultiMode; virtual; procedure SetMultiMode( Value: TMultiMode ); virtual; { List functions } procedure SetFilesList( Value: TStrings ); function GetFilename(Index: Integer): TZipFilename; function GetPathname(Index: Integer): TZipPathname; function GetFullname(Index: Integer): String; function GetCompressMethod(Index: Integer): WORD; function GetCompressMethodStr(Index: Integer): String; function GetDateTime(Index: Integer): TDateTime; function GetCrc(Index: Integer): LongInt; function GetCompressedSize(Index: Integer): LongInt; function GetUnCompressedSize(Index: Integer): LongInt; function GetExternalFileAttributes(Index: Integer): LongInt; function GetIsEncrypted(Index: Integer): Boolean; function GetHasComment(Index: Integer): Boolean; function GetFileComment(Index: Integer): String; function GetDiskNo(Index: Integer): Integer; function GetZipHasComment: Boolean; function GetZipComment: String; function GetZipSize: LongInt; {Decryption} function DecryptTheHeader( Passwrd: String; zfile: TStream ): BYTE; procedure update_keys( ch: char ); function decrypt_byte: BYTE; procedure Init_Keys( Passwrd: String ); procedure decrypt_buff( bufptr: BYTEPTR; num_to_decrypt: WORD ); procedure Update_CRC_buff( bufptr: BYTEPTR; num_to_update: WORD ); procedure Loaded; override; public { Public declarations } constructor Create( AOwner: TComponent ); override; destructor Destroy; override; procedure ReadZip; function UnZip: Integer; procedure ClearZip; procedure FillList( FilesList: TStrings ); procedure Sort( SMode: TZipSortMode ); procedure CancelTheOperation; function UnZipToStream( theStream: TStream; FName: String ): Integer; property ArchiveStream: TStream read theZipFile write SetArchiveStream; property Count: Integer read GetCount; property Filename[Index: Integer]: TZipFilename read GetFilename; property Pathname[Index: Integer]: TZipPathname read GetPathname; property FullName[Index: Integer]: String read GetFullName; property CompressMethod[Index: Integer]: WORD read GetCompressMethod; property CompressMethodStr[Index: Integer]: String read GetCompressMethodStr; property DateTime[Index: Integer]: TDateTime read GetDateTime; property Crc[Index: Integer]: LongInt read GetCrc; property CompressedSize[Index: Integer]: LongInt read GetCompressedSize; property UnCompressedSize[Index: Integer]: LongInt read GetUnCompressedSize; property ExternalFileAttributes[Index: Integer]: LongInt read GetExternalFileAttributes; property IsEncrypted[Index: Integer]: Boolean read GetIsEncrypted; property FileHasComment[Index: Integer]: Boolean read GetHasComment; property FileComment[Index: Integer]: String read GetFileComment; property DiskNo[Index: Integer]: Integer read GetDiskNo; property ZipComment: String read GetZipComment; property Password: String read FPassword write FPassword; property ZipHasComment: Boolean read GetZipHasComment; property NumDisks: Integer read FNumDisks; property ZipSize: LongInt read GetZipSize; property CheckDiskLabels: Boolean read GetCheckDiskLabels write SetCheckDiskLabels default True; property MultiMode: TMultiMode read GetMultiMode write SetMultiMode default mmNone; property Busy: Boolean read FBusy default False; published { Published declarations } property ThisVersion: Integer read FThisVersion write SetThisVersion default kpThisVersion; property ZipName: String read GetZipName write SetZipName; property DestDir: String read GetDestDir write SetDestDir; property RootDir: String read FRootDir write SetRootDir; property SortMode: TZipSortMode read FSortMode write FSortMode default ByNone; property RecreateDirs: Boolean read FRecreateDir write FRecreateDir default False; property OverwriteMode: TUZOverwriteMode read FOverwriteMode write FOverwriteMode default Prompt; property FilesList: TStrings read FFilesList write SetFilesList; property DoAll: Boolean read FDoAll write FDoAll default False; property IncompleteZipMode: TIncompleteZipMode read FIncompleteZipMode write FIncompleteZipMode default izAssumeMulti; property KeepZipOpen: Boolean read FKeepZipOpen write FKeepZipOpen default False; property DoProcessMessages: Boolean read FDoProcessMessages write FDoProcessMessages default True; property RetainAttributes: Boolean read FRetainAttributes write FRetainAttributes default True; { Event Properties } property OnStartUnZipInfo: TStartUnzipInfo read FOnStartUnzipInfo write FOnStartUnzipInfo; property OnFilePercentDone: TFilePercentDone read FOnFilePercentDone write FOnFilePercentDone; property OnTotalPercentDone: TTotalPercentDone read FOnTotalPercentDone write FOnTotalPercentDone; property OnStartUnZip: TStartUnZipEvent read FOnStartUnZip write FOnStartUnZip; property OnEndUnZip: TEndUnZipEvent read FOnEndUnZip write FOnEndUnZip; property OnPromptForOverwrite: TPromptForOverwrite read FOnPromptForOverwrite write FOnPromptForOverwrite; property OnSkippingFile: TSkippingFile read FOnSkippingFile write FOnSkippingFile; property OnBadPassword: TBadPassword read FOnBadPassword write FOnBadPassword; property OnBadCRC: TBadCRC read FOnBadCRC write FOnBadCRC; property OnInCompleteZip: TInCompleteZip read FOnInCompleteZip write FOnInCompleteZip; property OnGetNextDisk: TGetNextDisk read FOnGetNextDisk write FOnGetNextDisk; end; |
| Автор: Alex 20.3.2004, 07:57 |
| Что касается rar то самый надежный способ это работа через консоль |
| Автор: pascal 20.3.2004, 08:19 | ||
распоковывать лучше и удобней через unrar.dll |
| Автор: NiJazz 20.3.2004, 12:44 | ||
А где можно взять список экспортируемых функций? |
| Автор: pascal 20.3.2004, 16:02 | ||||
|