MCPcopy Create free account
hub / github.com/PDAL/PDAL / ready

Method ready

io/BpfReader.cpp:309–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307
308
309void BpfReader::ready(PointTableRef)
310{
311 m_istreamPtr = Utils::openFile(m_filename);
312 m_stream = ILeStream(m_istreamPtr);
313 m_stream.seek(m_header.m_len);
314 m_index = 0;
315 m_start = m_stream.position();
316#ifdef PDAL_HAVE_ZLIB
317 if (m_header.m_compression)
318 {
319 m_deflateBuf.resize(numPoints() * m_dims.size() * sizeof(float));
320 size_t index = 0;
321 size_t bytesRead = 0;
322 do
323 {
324 bytesRead = readBlock(m_deflateBuf, index);
325 index += bytesRead;
326 } while (bytesRead > 0 && index < m_deflateBuf.size());
327 m_charbuf.initialize(m_deflateBuf.data(), m_deflateBuf.size(), m_start);
328 m_stream.pushStream(new std::istream(&m_charbuf));
329 }
330#endif // PDAL_HAVE_ZLIB
331}
332
333
334void BpfReader::done(PointTableRef)

Callers

nothing calls this directly

Calls 9

resizeMethod · 0.80
ILeStreamClass · 0.70
numPointsFunction · 0.70
openFileFunction · 0.50
seekMethod · 0.45
positionMethod · 0.45
sizeMethod · 0.45
initializeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected