BOOL LASreadPoint::init(ByteStreamIn* instream) { if (!instream) return FALSE; this->instream = instream; // on very first init with chunking enabled if (number_chunks == U32_MAX) { if (!read_chunk_table()) { return FALSE; } current_chunk = 0; if (chunk_totals) chunk_size = chunk_totals[1]; } point_start = instream->tell(); U32 i; for (i = 0; i < num_readers; i++) { ((LASreadItemRaw*)(readers_raw[i]))->init(instream); } if (dec) { readers = 0; } else { readers = readers_raw; } return TRUE; }
BOOL LASreadPoint::init_dec() { // maybe read chunk table (only if chunking enabled) if (number_chunks == U32_MAX) { if (!read_chunk_table()) { return FALSE; } current_chunk = 0; if (chunk_totals) chunk_size = chunk_totals[1]; } point_start = instream->tell(); readers = 0; return TRUE; }