All pastes #285076 Raw Edit

Mine

public text v1 · immutable
#285076 ·published 2006-12-19 16:17 UTC
rendered paste body
Dim BR As System.IO.BinaryReader = New System.IO.BinaryReader(System.IO.File.Open(strFileName, System.IO.FileMode.Open))
		Dim BW As System.IO.BinaryWriter = New System.IO.BinaryWriter(System.IO.File.Open(strFileName, System.IO.FileMode.CreateNew))
		Const conChunkSize As Integer = 10240
		Dim intFileSize As Integer = 100000
		Dim intChunks, intRemainder, i As Integer, bBytes(conChunkSize - 1) As Byte
		intChunks = Int(intFileSize / conChunkSize)
		intRemainder = intFileSize Mod conChunkSize
		For i = 1 To intChunks
			bBytes = BR.ReadBytes(conChunkSize)
			BW.Write(bBytes)
		Next
		bBytes = BR.ReadBytes(conChunkSize)
		BW.Write(bBytes)
		BW.Flush()
		BW.Close()
		BR.Close()