![]() |
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
Have some TStream helper routines that do deleting and inserting without using a temp file. Can email the unit if you are interested.
Chris |
#3
|
|||
|
|||
![]()
That'd be cool, thanks.
spooky(at)nildram.co.uk --- Spooky |
![]() |
Thread Tools | |
Display Modes | |
|
|