• J
    qtest: Add base64 encoded read/write · 7a6a740d
    John Snow 提交于
    For larger pieces of data that won't need to be debugged and
    viewing the hex nibbles is unlikely to be useful, we can encode
    data using base64 instead of encoding each byte as %02x, which
    leads to some space savings and faster reads/writes.
    
    For now, the default is left as hex nibbles in memwrite() and memread().
    For the purposes of making qtest io easier to read and debug, some
    callers may want to specify using the old encoding format for small
    patches of data where the savings from base64 wouldn't be that profound.
    
    memwrite/memread use a data encoding that takes 2x the size of the original
    buffer, but base64 uses "only" (4/3)x, so for larger buffers we can save a
    decent amount of time and space.
    Signed-off-by: NJohn Snow <jsnow@redhat.com>
    Message-id: 1430864578-22072-3-git-send-email-jsnow@redhat.com
    7a6a740d
libqtest.c 18.6 KB