File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 11name = " PcapTools"
22uuid = " 222fe7e8-3f39-464a-bf97-d9bbb753f246"
33authors = [" Christian Rorvik <christian.rorvik@gmail.com>" ]
4- version = " 1.3 .0"
4+ version = " 1.4 .0"
55
66[deps ]
77CRC32 = " b4567568-9dcc-467e-9b62-c342d3a501d3"
Original file line number Diff line number Diff line change @@ -26,13 +26,18 @@ mutable struct PcapBufferReader <: PcapReader
2626end
2727
2828"""
29- PcapBufferReader(path::AbstractString)
29+ PcapBufferReader(path::AbstractString; mmap = false )
3030
31- Memory map file in `path` and create PcapBufferReader over its content.
31+ Read file in `path` to memory and create PcapBufferReader over its content.
32+
33+ If `mmap = true`, file is Mmap.mmap'd to memory instead of reading it.
3234"""
33- function PcapBufferReader (path:: AbstractString )
34- io = open (path)
35- data = Mmap. mmap (io)
35+ function PcapBufferReader (path:: AbstractString ; mmap = false )
36+ if mmap
37+ data = open (Mmap. mmap, path)
38+ else
39+ data = read (path)
40+ end
3641 PcapBufferReader (data)
3742end
3843
You can’t perform that action at this time.
0 commit comments