-
Ok, i'm going directly to ask for the extreme:
Does anyone know how to remove the last byte on a 50M file?
As for my solution that would take a 15 sec, as it empties the file with output and rewrites it in binary.
I'm actually just working with mp3's but it's annoying amount of time (1-2) sec and the harddisk chattters alot.
AFAIK, vb, can't do it so giving me a dll made in c++ or something would be great.
-
FileData$ = mid$(FileData$,1,Len(FileData$) - 1)
-
Raydr, I don't think a 50MB file can fit into a String data type. :)
My only suggestion is to make as large of a file buffer as possible, so you can cut down on the disk seek times.
What is the size of your file buffer?
-
Yes it does, 2G go to a varlen string, but that code rayd is a simplification of what i'm doing, that takes 15 sec for a 50M file
-
hah, 2GB string you're right.
still, even if you wanted to load the whole file in memory, it would most likely be swaped to the HDD. :)
-
go look at the definition of varlen string. ok, is there any guy who have solved this problem at all? there must be.
I expect it can be done in C++
-
Reply, please someone reply?!?!
-
I have tried a lot of various ideas, but can't seem to get it to work.
I tried forcing an EOF marker where the last byte was, but that didn't work (though maybe someone knows how to do that?). I also tried writing null characters etc, but that only ended up with a space at the end of the file, which is the best i can do.
Still looking into it. ;)
-
Thanks for doing that, ;) I hope there are others who want to know