new PIChunkStream::extract() method

This commit is contained in:
2020-10-08 22:29:47 +03:00
parent 4c0fe72d71
commit 16cfdc709b
2 changed files with 12 additions and 0 deletions

View File

@@ -115,7 +115,16 @@ void PIChunkStream::readAll() {
PIChunkStream::~PIChunkStream() {
}
bool PIChunkStream::extract(PIByteArray & data) {
if (data.size_s() < 4) return false;
data >> tmp_data;
if (tmp_data.size_s() < 4) return false;
data_ = &tmp_data;
_init();
return true;
}