print_buffer(Pl_Buffer* bp)
{
    bp->finish();
    Buffer* b = bp->getBuffer();
    unsigned char const* p = b->getBuffer();
    size_t l = b->getSize();
    for (unsigned long i = 0; i < l; ++i)
    {
        std::cout << QUtil::uint_to_string_base(p[i], 16, 2)
                  << ((i == l - 1) ? "\n" : " ");
    }
    std::cout << std::endl;
    delete b;
}
print_buffer(Pl_Buffer* bp)
{
    bp->finish();
    Buffer* b = bp->getBuffer();
    unsigned char const* p = b->getBuffer();
    size_t l = b->getSize();
    for (unsigned long i = 0; i < l; ++i)
    {
        std::cout << QUtil::uint_to_string_base(p[i], 16, 2)
                  << ((i == l - 1) ? "\n" : " ");
    }
    std::cout << std::endl;
    delete b;
}