mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 02:41:09 +00:00
open mmap with ACCESS_READ
This commit is contained in:
@@ -12,7 +12,7 @@ import gzip
|
||||
|
||||
|
||||
def MmapSource(f):
|
||||
mapping = mmap.mmap(f.fileno(), 0)
|
||||
mapping = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
|
||||
|
||||
def get_bytes(offset, length):
|
||||
return mapping[offset : offset + length]
|
||||
|
||||
Reference in New Issue
Block a user