[Gambas-user] fastest way to "zero-out" a huge binary file

kevinfishburne kevinfishburne at ...1887...
Sun Jan 24 06:08:54 CET 2010



kevinfishburne wrote:
> 
> Excellent, thanks. I seem to have found something horrifying while trying
> to create the file using GAMBAS however; using the SEEK statement with an
> argument greater than 2 GB raises a "Bad argument" error. While that
> doesn't affect my ability to create the file, it kills me later when
> trying to read and write to it. Other than using a different version of
> GAMBAS all I can think to do is to create four 2 GB data files, which will
> create additional overhead in the read/write procedures that access the
> file. Actually since my file is slightly larger than 8 GB I'll need to
> create five separate files. :(
> 

Praise God, I was incorrect. I was foolishly using too small a datatype
(integer) when calculating the seek position. Now that I switched it to long
all is well. :)

-----
Kevin Fishburne, Eight Virtues
www:  http://sales.eightvirtues.com http://sales.eightvirtues.com 
e-mail:  mailto:sales at ...1887... sales at ...1887... 
phone: (770) 853-6271
-- 
View this message in context: http://old.nabble.com/fastest-way-to-%22zero-out%22-a-huge-binary-file-tp27290885p27292340.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list