|
-
May 31st, 2000, 03:02 AM
#1
Thread Starter
transcendental analytic
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.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 31st, 2000, 03:06 AM
#2
Addicted Member
FileData$ = mid$(FileData$,1,Len(FileData$) - 1)
-
May 31st, 2000, 03:15 AM
#3
Hyperactive Member
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?
-
May 31st, 2000, 03:18 AM
#4
Thread Starter
transcendental analytic
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
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 31st, 2000, 03:26 AM
#5
Hyperactive Member
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.
-
May 31st, 2000, 03:39 AM
#6
Thread Starter
transcendental analytic
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++
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 31st, 2000, 04:00 PM
#7
Thread Starter
transcendental analytic
Reply, please someone reply?!?!
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 31st, 2000, 05:14 PM
#8
Fanatic Member
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.
Iain, thats with an i by the way!
-
May 31st, 2000, 08:42 PM
#9
Thread Starter
transcendental analytic
Thanks for doing that, I hope there are others who want to know
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|