python 如何解压缩以ZStandard压缩格式编写的文件。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 如何解压缩以ZStandard压缩格式编写的文件。相关的知识,希望对你有一定的参考价值。

# Library that supports Zstandard compression format
import zstd

# Open the compressed file
with open("/zeppelin/logs/a.csv.zstd", "rb") as file_in:
    
    # Open the output file
    with open("/zeppelin/logs/b.csv", "w") as out_in:
        
        # Write with the UTF-8 conversion
        out_in.write(zstd.uncompress(file_in.read()).decode('utf-8'))
        
        

以上是关于python 如何解压缩以ZStandard压缩格式编写的文件。的主要内容,如果未能解决你的问题,请参考以下文章