SQLite Forum

Suggestion to support gzipped text in vsv extension
Login
Sorry for being so succint :-) 
And thanks Keith for your kind clarification, and applying the patch.

I only entered a brief description as a comment in the patch:

```
+** The file content can be plain text, or text compressed with gzip (if this
+** code was compiled with "-DSQLITE_HAVE_ZLIB -lz").
```

Definitively the word "automagically" would have helped in the comment.

The gzopen() function detects the magic signature of gzip compression (1f 8b), at the beginning of the file, and later the other gz* functions in zlib know if they need to operate either on a compressed or on an uncompressed file.
For our vsv.c purposes, the file content is always text (compressed or not), but in fact the gz* functions work as well on binary content.