Documentation Source Text

Check-in [23f1f44cc2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improvements to ZIP processing in the CLI document. Fix a hyperlink in the sqlar.html document.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 23f1f44cc249126d2bcc0a07d57d8b68c4683ad05dcd007d10523ce046671fc7
User & Date: drh 2018-03-10 18:40:24
Context
2018-03-10
20:39
Updates to the TCL interface documentation, plus other minor typo fixes. check-in: 381e82d92b user: drh tags: trunk
18:40
Improvements to ZIP processing in the CLI document. Fix a hyperlink in the sqlar.html document. check-in: 23f1f44cc2 user: drh tags: trunk
15:27
Improvements to the sqlar.html page. check-in: 0a2c8d8f26 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/cli.in.

985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
files silently replace existing files with the same names, but otherwise
the initial contents of the archive (if any) remain intact.


<h2> Operations On ZIP Archives </h2>

<p>If FILE is a ZIP archive rather than an SQLite Archive, the ".archive"
command and the "-A" command-line option still work, except that
only --extract and --list operations are supported.
ZIP archives are currently read-only to SQLite.  (This limitation may be
relaxed in a future release.)

<p>For example, the following commands are roughly equivalent
(differing only in output formatting):

<codeblock>
unzip -l archive.zip
sqlite3 archive.zip -Atv
</codeblock>

<h2> SQL Used To Implement SQLite Archive Operations </h2>

<p>The various SQLite Archive Archive commands are implemented using SQL statements.
Application developers can easily add SQLite Archive Archive reading and writing
support to their own projects by running the appropriate SQL.








|
|
|
|
|
|
|
|
|
|
|
<







985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002

1003
1004
1005
1006
1007
1008
1009
files silently replace existing files with the same names, but otherwise
the initial contents of the archive (if any) remain intact.


<h2> Operations On ZIP Archives </h2>

<p>If FILE is a ZIP archive rather than an SQLite Archive, the ".archive"
command and the "-A" command-line option still work.  This is accomplished
using of the [zipfile] extension.
Hence, the following commands are roughly equivalent,
differing only in output formatting:

<table striped=1>
  <tr><th>Traditional Command<th>Equivalent sqlite3.exe Command
  <tr><td>unzip archive.zip<td>sqlite3 -Axf archive.zip
  <tr><td>unzip -l archive.zip<td>sqlite3 -Atvf archive.zip
  <tr><td>zip -r archive2.zip dir<td>sqlite3 -Acf archive2.zip dir
</table>


<h2> SQL Used To Implement SQLite Archive Operations </h2>

<p>The various SQLite Archive Archive commands are implemented using SQL statements.
Application developers can easily add SQLite Archive Archive reading and writing
support to their own projects by running the appropriate SQL.

Changes to pages/sqlar.in.

112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
</ul>
Questions like these (and countless others) can be answered without
having to uncompress or extract any content.

<li><p>
Applications that already use SQLite for other purposes can easily
add support for SQLite Archives using a small extension
([https://sqlite.org/src/ext/misc/sqlar.c]) to handle the compression
and decompression of content.  Even this tiny extension can be omitted
if the files in the archive are uncompressed.  In contrast, supporting
ZIP Archives and/or Tarballs requires either separate libraries or
lots of extra custom code, or sometimes both.
</ol>

<h1>Disadvantages Of SQLite Archives</h1>







|







112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
</ul>
Questions like these (and countless others) can be answered without
having to uncompress or extract any content.

<li><p>
Applications that already use SQLite for other purposes can easily
add support for SQLite Archives using a small extension
([https://sqlite.org/src/file/ext/misc/sqlar.c]) to handle the compression
and decompression of content.  Even this tiny extension can be omitted
if the files in the archive are uncompressed.  In contrast, supporting
ZIP Archives and/or Tarballs requires either separate libraries or
lots of extra custom code, or sometimes both.
</ol>

<h1>Disadvantages Of SQLite Archives</h1>