ReadBinaryChunk

Reads certain chunk of a file in binary.
Used with large files (like ~7gb large) since we were not able to use Notepad++ nor Excel itself to reads it. Or just because we do not have strong machine to handle this type of files.

CodeFunctionName
What is this?

Public

Tested

Original Work
Function ReadBinaryChunk(Filename, Optional FromLine = 1000, Optional LineLen = 100)
    ' Read certain chunk of a file in binary mode
    '    Used in large files, like ~7gb large
    Dim OneChunk as string
    iFile                        = FreeFile()
    Open Filename For Binary Access Read As #iFile
    OneChunk                    = String$(LineLen, " ")
    Rett                        = ""
    Get #iFile, FromLine, OneChunk ' OneChunk = Input(LOF(iFile), #iFile)
    Rett                        = OneChunk
    Doevents
    Close #iFile
    ReadBinaryChunk        = Rett
End Function

Filename, Optional FromLine = 1000, Optional LineLen = 100

Views 130

Downloads 65

CodeID
DB ID