MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / read

Method read

test/general/lm_eval/decontamination/archiver.py:132–137  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

130 yield line[:-1], raw_bytes_read
131
132 def read(self):
133 with open(self.file_path, "r", encoding="utf8") as fh:
134 with mmap.mmap(fh.fileno(), length=0, access=mmap.ACCESS_READ) as mmap_obj:
135 for line in iter(mmap_obj.readline, b""):
136 line = line.decode("utf-8")
137 yield line[:-1]
138
139 def read_slow(self):
140 with open(self.file_path, "r", encoding="utf8") as fh:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected