How do I compress a text file in Ubuntu using Snappy

时间:2016-04-04 17:19:03

标签: ubuntu compression codec

I have done an sudo apt-get install snappy on Ubuntu 14.04 and now every time I try and run the command snappy textfile.txt to compress textfile.txt. I get an error saying:

** (snappy:14342): ERROR **: Error discovering URI: This appears to be a text file. Trace/breakpoint trap (core dumped)

Anyone have any clue why this happened?

If I am doing it wrong, please show me a proper way to compress the text file with snappy.

2 个答案:

答案 0 :(得分:5)

您安装了snappy电影播放器​​,当您尝试打开文本文件而不是媒体文件时,它会抱怨。 要安装snappy压缩库,你必须

sudo apt-get install libsnappy-dev

没有用于snappy压缩的默认命令行工具,你必须自己制作或安装另一个工具(或者是肛门并创建一个Perl one liner)。我使用Python进行压缩或在https://github.com/kubo/snzip

找到包装器

支持的语言可以在这里找到: https://google.github.io/snappy/

答案 1 :(得分:-1)

检查出来.. 几天前我正在研究Snappy,我发现这篇文章很有用.. Snappy Compression tool