zoukankan      html  css  js  c++  java
  • 关于文件压缩的一些小知识

    以前也没研究过这些,很多时候也搞不太清楚他们之间的关系,今天把以前遇到的问题一一揭开

    .Z

    Unix Shell的一个程序compress基于LZC算法将文件压缩,typically,被压缩的文件后缀是.z。 Most tar programs will pipe their data through compress when given the command line option "-Z". 

    ZIP

    ZIP是一种支持无损压缩的文件格式,A .ZIP file may contain one or more files or folders that may have been compressed. The .ZIP file format permits a number of compression algorithms. The format was originally created in 1989 by Phil Katz, and was first implemented in PKWARE's PKZIP utility, as a replacement for the previous ARC compression format by Thom Henderson. 

    ARC

    ARC是一种压缩和archive的文件格式(有同名的程序arc用于handle这种文件格式)。

    在1980s的晚期,ARC的发明人SEA和ZIP的发明人Phil Katz Software打一场官司,SEA告Katz侵权,后来法庭调解,双方互相licence对方使用彼此兼容的程序。该案结束后,BBS上掀起对这件事的大讨论,更多的人认为SEA使用追溯的方法试图将ARC搞成封闭的和私有的。认为SEA是在以大欺小,尽管他们都是home-based的小公司。结果就是ARC格式迅速衰落,大家都转向使用ZIP,抛弃了ARC。

    TAR(.tar)

    起源于 Tape Archive。是一种文件格式(有同名的程序tar用于handle这种文件格式)。 最初的设计目标是为了把数据顺序化地写到tape以做备份。tar is now commonly used to collect many files into one larger file for distribution or archiving, while preserving file system information such as user and group permissions, dates, and directory structures. 也就是tar能够保持文件所处的文件系统的信息。详情见tar

    gzip

    gzip是一种无损压缩的文件格式(同名的程序gzip用于handle这种文件格式)。gzip is based on the DEFLATE algorithm, which is a combination of LZ77 and Huffman coding. DEFLATE was intended as a replacement for LZW and other patent-encumbered data compression algorithms which, at the time, limited the usability of compress and other popular archivers.

    gzip is not to be confused with the ZIP archive format, which also uses DEFLATE. The ZIP format can hold collections of files without an external archiver, but is less compact than compressed tarballs holding the same data, because it compresses files individually and cannot take advantage of redundancy between files (solid compression).

    bzip2

    bzip2 is a free and open-source file compression program that uses the Burrows–Wheeler algorithm. It only compresses single files and is not a file archiver. It is developed and maintained by Julian Seward.

    Like gzip, bzip2 is only a data compressor. It is not an archiver like tar or ZIP; the program itself has no facilities for multiple files, encryption or archive-splitting, but, in the UNIX tradition, relies instead on separate external utilities such as tar and GnuPG for these tasks.

    RAR

    RAR是一种私有的文件格式,有俄国人发明,支持压缩、错误恢复和文件分割(file spanning)。

    总结

    这篇文章只是一小部分,看看Wiki上对压缩格式的比较吧,很全面 http://en.wikipedia.org/wiki/Comparison_of_archive_formats

  • 相关阅读:
    MySQL------Navicat安装与激活
    MySQL------如何将SQLServer文件数据迁移到MySQL
    WinForm------如何跳转另一个窗口,同时关闭当前窗口
    C#------如何判断输入的是否为纯数字
    WinForm------GridControl显示每行的Indicator中的行号
    WinForm------给GridControl添加搜索功能
    WinForm------分页控件dll下载地址
    WinForm------ToolTipController与GridControl的连用
    利用IE/FF的不同识别CSS来使用浏览器兼容问题
    互换两条记录中的字段值方法(有待测试,,)
  • 原文地址:https://www.cnblogs.com/whyandinside/p/3610463.html
Copyright © 2011-2022 走看看