美文网首页
zlib module

zlib module

作者: cutelittlePanda | 来源:发表于2017-08-29 14:11 被阅读0次

    import zlib

    zlib.compress(data, level=-1) : return a bytes object containing the compressed data;

    * data should be in bytes type, if not, convert it to, such as type 'str' to type 'bytes' with command 'str.encode(string_data)';

    * the return is also a bytes object, can convert it to str using command 'bytes_obj.decode()';

    following snapshot is the coding sample;

    zlib.compress(bytes_data, level)

    相关文章

      网友评论

          本文标题:zlib module

          本文链接:https://www.haomeiwen.com/subject/xruodxtx.html