Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-26-2004, 08:06 PM
-Spooky- -Spooky- is offline
Junior Member
 
Join Date: Sep 2002
Posts: 3
Default Large Archives

Hiya, this is more of a general programming question that Delphi specific, but I hope you can help .

I'm working on a program that deals with very large files that contain smaller files, an archive, like a primitive zip. These files can be upto 600MB and are basicly set out like...

[MAIN ARCHIVE HEADER]
[SMALL FILE HEADER]
[SMALL FILE DATA]
[SMALL FILE HEADER]
[SMALL FILE DATA]
[SMALL FILE HEADER]
[SMALL FILE DATA]
etc...

The program will be a sort of manager for these files that will be able to Add, Delete, Rename etc. Its all working but its not exactly fast at deleting. Adding is simple, just open the file, seek to the end, start writing and its done in miliseconds, but when deleting i'm copying data out in chunks and writing it to a temporary file till I reach the file I want to delete, then skipping past that file and repeating the above till the EOF, then deleting the original file and renaming the temp file. With a really big file this process can take ages on an older machine yet programs like WinZip, PakExplorer (a Quake .pak file manager) and HexWorkshop to name a few can delete sections of massive files and save instantly... how?!

Thanks alot

---
Spooky
Reply With Quote
  #2  
Old 01-27-2004, 04:03 PM
chris_w chris_w is offline
Senior Member
 
Join Date: Jan 2004
Posts: 1,397
Default RE: Large Archives

Have some TStream helper routines that do deleting and inserting without using a temp file. Can email the unit if you are interested.

Chris
Reply With Quote
  #3  
Old 01-28-2004, 02:04 PM
-Spooky- -Spooky- is offline
Junior Member
 
Join Date: Sep 2002
Posts: 3
Default RE: Large Archives

That'd be cool, thanks.

spooky(at)nildram.co.uk

---
Spooky
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 04:41 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.