Sinisterly
Create Your Own File Pumper ! - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.li/Forum-Visual-Basic-NET-Framework)
+--- Thread: Create Your Own File Pumper ! (/Thread-Create-Your-Own-File-Pumper)

Pages: 1 2


RE: Create Your Own File Pumper ! - White Charisma - 07-10-2011

Your welcome, i didn't make a tut though, so your epic :epic:


RE: Create Your Own File Pumper ! - Raiden - 07-11-2011

(07-10-2011, 10:45 PM)Nathan Wrote: Your welcome, i didn't make a tut though, so your epic :epic:

<3 Biggrin


RE: Create Your Own File Pumper ! - Mr.Kewl - 08-08-2011

Thanks for sharing this.
<3


RE: Create Your Own File Pumper ! - nilangalk - 08-15-2011

Thanks dude...good job...................................


RE: Create Your Own File Pumper ! - Fuckedyouover - 08-15-2011

Thanks man! Very nice share.


RE: Create Your Own File Pumper ! - Frooxius - 08-17-2011

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".