4q 中文文档教程
4Q
4Q:最终存档格式。
4Q是一个数据& 用于归档文件集合的文件格式 文件夹,例如“tar”、“zip”和“winrar”。 它的主要区别特征是:
- All important unix/posix attributes are preserved (owner, group, permissions, create/modify timestamps).
- The format is streamable: Files may be unpacked as an archive is read, and an archive may be written with minimal buffering.
- Compression may occur per-file or over the whole archive, using snappy (very fast) or LZMA2 (very compact).
- Modern crypto is used: SHA-512 for verification, and AES-256 for encryption. Encryption uses the keybase.io registry (and library).
Status
截至今天(2015 年 1 月),我对数据格式非常满意,因此不太可能更改,但如果我觉得我保留在接下来的几个月中进行一些最后调整的权利他们是必要的。 当我将版本升级到 1.0 时,我将保证不再更改基础数据格式,这应确保从那时起支持所有存档文件。
有一些我想要的缺失功能(列在下面的 TODO 部分)。 大多数都是小事,但能够(以加密方式)签署档案是我想在宣布 1.0 胜利之前完成的一项功能。 如果您有任何您认为是硬性要求的宠物功能(或错误),请告诉我,以便我将其考虑在内。
Usage
所有命令行工具都会响应 --help
。
创建名为 myfiles.4q
的文件夹 myfiles
的存档:
$ qpack myfiles
为 keybase 用户 robey 加密源代码文件夹到名为 secret.4q 的存档中
:
$ qpack -e robey -o secret.4q src/main/wibble/
列出名为 myfiles.4q
的档案中的文件: 将档案 secret.4q
$ qls myfiles.4q
解压到一个新的临时文件夹中:
$ qunpack secret.4q -o temp
TODO
- signed bottles
- support symbolic links
- force-overwrite mode for qunpack
- qunpack should preserve ownership by default when running as root
- qunpack should have an option to ignore ownership, and one to ignore permissions
- sparse files
4Q
4Q: the final archive format.
4Q is a data & file format for archiving collections of files & folders, like "tar", "zip", and "winrar". Its primary differentiating features are:
- All important unix/posix attributes are preserved (owner, group, permissions, create/modify timestamps).
- The format is streamable: Files may be unpacked as an archive is read, and an archive may be written with minimal buffering.
- Compression may occur per-file or over the whole archive, using snappy (very fast) or LZMA2 (very compact).
- Modern crypto is used: SHA-512 for verification, and AES-256 for encryption. Encryption uses the keybase.io registry (and library).
Status
As of today (January 2015), I'm pretty satisfied with the data format, so it's unlikely to change, but I reserve the right to make some last-minute adjustments over the next few months if I feel they're necessary. When I bump the version to 1.0, I'll promise not to change the underlying data format anymore, which should ensure all archive files are supported from then on.
There are some missing features that I'd like (listed in the TODO section below). Most are small things, but being able to (cryptographically) sign an archive is one feature I'd like to finish before declaring 1.0 victory. If you have any pet features (or bugs) that you consider a hard requirement, let me know, so I can take that into consideration.
Usage
All of the command-line tools respond to --help
.
To create an archive of the folder myfiles
, called myfiles.4q
:
$ qpack myfiles
To encrypt a folder of source code for keybase user robey, into an archive named secret.4q
:
$ qpack -e robey -o secret.4q src/main/wibble/
To list the files in an archive called myfiles.4q
:
$ qls myfiles.4q
To unpack the archive secret.4q
into a new temporary folder:
$ qunpack secret.4q -o temp
TODO
- signed bottles
- support symbolic links
- force-overwrite mode for qunpack
- qunpack should preserve ownership by default when running as root
- qunpack should have an option to ignore ownership, and one to ignore permissions
- sparse files