Example #1
0
void Filter::verifyUnfilter()
{
    // Note:
    //   This verify is just because of complete paranoia that there
    //   could be a hidden bug in the filter implementation, and
    //   it should not be necessary at all.
    //   Maybe we will remove it at some future point.
    //
    // See also:
    //   Packer::verifyOverlappingDecompression()

    //printf("verifyUnfilter: %02x %p %d\n", this->id, this->buf, this->buf_len);
    if (clevel != 1)
        unfilter(this->buf, this->buf_len, true);
}
Example #2
0
Array<Vector<super_t,2>,4> supertensor_index_t::unpack_block(const block_t block, RawArray<const uint8_t> compressed) {
  const auto shape = block_shape(block.x.shape(),block.y);
  const auto data = decompress(compressed,sizeof(Vector<super_t,2>)*shape.product(),unevent);
  return unfilter(filter,shape,data);
}