Fourteen Years of Service
Posts: 1,219
Threads: 151
RE: Create Your Own File Pumper ! 07-10-2011, 10:45 PM
#11
Your welcome, i didn't make a tut though, so your epic :epic:
•
Fourteen Years of Service
Posts: 6
Threads: 0
RE: Create Your Own File Pumper ! 08-08-2011, 01:03 PM
#13
Thanks for sharing this.
<3
•
Fourteen Years of Service
Posts: 17
Threads: 3
RE: Create Your Own File Pumper ! 08-15-2011, 07:31 AM
#14
Thanks dude...good job...................................
•
Fourteen Years of Service
Posts: 113
Threads: 18
RE: Create Your Own File Pumper ! 08-15-2011, 07:40 AM
#15
Thanks man! Very nice share.
•
Fourteen Years of Service
Posts: 721
Threads: 49
RE: Create Your Own File Pumper ! 08-17-2011, 05:18 PM
#16
Interesting, but why won't you let the system handle the writing of large amounts of bytes, instead of writing each one of them, byte by byte in your program?
If you replace
Code:
Dim filetopump = IO.File.OpenWrite(sfd.FileName)
Dim size = filetopump.Seek(0, IO.SeekOrigin.[End])
While size < filesize
filetopump.WriteByte(0)
size += 1
End While
filetopump.Close()
With
Code:
Dim filetopump = IO.File.OpenWrite(sfd.FileName)
filetopump.Position = filesize-1
filetopump.WriteByte(0)
filetopump.Close()
The code will be simpler (no loop needed) and it will also get the same job done A LOT faster, because the system handles writing all the zero bytes in more optimized manner instead of your code having do the same thing "manually".
I love creativity and creating, I love science and rational thought, I am an open atheist and avid self-learner.
•