MCPcopy
hub / github.com/protomaps/PMTiles / MmapSource

Function MmapSource

python/pmtiles/pmtiles/reader.py:14–20  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

12
13
14def MmapSource(f):
15 mapping = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
16
17 def get_bytes(offset, length):
18 return mapping[offset : offset + length]
19
20 return get_bytes
21
22
23def MemorySource(buf):

Callers 14

pmtiles_to_mbtilesFunction · 0.90
pmtiles_to_dirFunction · 0.90
__enter__Method · 0.90
test_export_tilesFunction · 0.90
test_export_zoom_bothFunction · 0.90
test_export_zoom_neitherFunction · 0.90
test_export_jobsFunction · 0.90
test_export_src_nodataFunction · 0.90
test_export_bilinearFunction · 0.90
test_skip_emptyFunction · 0.90

Calls

no outgoing calls

Tested by 12

__enter__Method · 0.72
test_export_tilesFunction · 0.72
test_export_zoom_bothFunction · 0.72
test_export_zoom_neitherFunction · 0.72
test_export_jobsFunction · 0.72
test_export_src_nodataFunction · 0.72
test_export_bilinearFunction · 0.72
test_skip_emptyFunction · 0.72
test_include_emptyFunction · 0.72
test_export_countFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…