From acd6fdee98ba573ab1e3be9a7f6dd4eeb4a213c8 Mon Sep 17 00:00:00 2001 From: drh Date: Sun, 7 Jan 2018 19:52:28 +0000 Subject: Improved comments on the sqlar.c and compress.c extensions that describe the differences between the "zlib format" used by SQLAR, the raw deflate format used by ZIP, and the custom format used by compress.c. No changes to code. FossilOrigin-Name: c13415c5caf06eaa73086c500907451dfcdfd1354ac4a9ab63edb7255edbfa1b --- ext/misc/sqlar.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ext/misc/sqlar.c') diff --git a/ext/misc/sqlar.c b/ext/misc/sqlar.c index 17d087593..e812d70c9 100644 --- a/ext/misc/sqlar.c +++ b/ext/misc/sqlar.c @@ -24,6 +24,14 @@ SQLITE_EXTENSION_INIT1 ** If the type of X is SQLITE_BLOB, and compressing that blob using ** zlib utility function compress() yields a smaller blob, return the ** compressed blob. Otherwise, return a copy of X. +** +** SQLar uses the "zlib format" for compressed content. The zlib format +** contains a two-byte identification header and a four-byte checksum at +** the end. This is different from ZIP which uses the raw deflate format. +** +** Future enhancements to SQLar might add support for new compression formats. +** If so, those new formats will be identified by alternative headers in the +** compressed data. */ static void sqlarCompressFunc( sqlite3_context *context, -- cgit v1.2.3