Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Improvements to README.md |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a0cf8ef8b7c0c8e5a00dc78b612f2871 |
User & Date: | drh 2014-03-14 01:01:11.286 |
Context
2014-04-07
| ||
01:26 | Add the -n option to disable compression. check-in: d5ea353587 user: drh tags: trunk | |
2014-03-14
| ||
01:01 | Improvements to README.md check-in: a0cf8ef8b7 user: drh tags: trunk | |
00:43 | Add a README file. check-in: 6b775f1f03 user: drh tags: trunk | |
Changes
Changes to README.md.
1 2 3 4 5 6 7 8 9 10 11 12 13 | <h1 align="center">SAR - SQLite Archiver</h1> This repository contains sources for a proof-of-concept "SQLite Archiver" program. This program (named "sar") operates much like "zip", except that the compressed archive it builds is stored in an SQLite database instead of a ZIP archive. The motivation for this is to see how much larger an SQLite database file is compared to a ZIP archive containing the same content. The answer depends on the filenames, but 2% seems to be a reasonable guess. In other words, storing files as compressed blobs in an SQLite database file results in a file that is only about 2% larger than storing those same files in a ZIP archive using the same compression. | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | <h1 align="center">SAR - SQLite Archiver</h1> This repository contains sources for a proof-of-concept "SQLite Archiver" program. This program (named "sar") operates much like "zip", except that the compressed archive it builds is stored in an SQLite database instead of a ZIP archive. The motivation for this is to see how much larger an SQLite database file is compared to a ZIP archive containing the same content. The answer depends on the filenames, but 2% seems to be a reasonable guess. In other words, storing files as compressed blobs in an SQLite database file results in a file that is only about 2% larger than storing those same files in a ZIP archive using the same compression. ## Compiling On unix, just type "make". The SQLite sources are included. The zlib compression library is needed to build. ## Usage To create an archive: sar ARCHIVE FILES... All files named in FILES... will be added to the archive. If another file with the same name already exists in the archive, it is replaced. If any of the named FILES is a directory, that directory is scanned recursively. To see the contents of an archive: sar -l ARCHIVE To extract the contents of an archive: sar -x ARCHIVE [FILES...] If a FILES argument is provided, then only the named files are extracted. Without a FILES argument, all files are extracted. All commands can be supplemented with -v for verbose output. For example: sar -v ARCHIVE FILES.. sar -lv ARCHIVE sar -xv ARCHIVE ## Storage The database schema looks like this: CREATE TABLE sar( name TEXT PRIMARY KEY, -- name of the file mode INT, -- access permissions mtime INT, -- last modification time sz INT, -- original file size data BLOB -- compressed content ); Both directories and empty files have sar.sz==0. Directories can be distinguished from empty file because directories have sar.data IS NULL. |