sqlite> load zipfile.so

sqlite> SELECT * FROM zipfile('rows.zip');
name,mode,mtime,sz,data,method
row1.txt,33204,1514396814,22,"text of file row1.txt
",0
row2.txt,33204,1514396416,22,"text of file row2.txt
",0

--Extra newline is introduced for some reason.
--Added explicit newline to end of row1.txt, then got this:

sqlite> SELECT * FROM zipfile('rows.zip');
name,mode,mtime,sz,data,method
row1.txt,33204,1514397988,23,"text of file row1.txt

",0
row2.txt,33204,1514396416,22,"text of file row2.txt
",0

#testfile
$ zip -0 rows.zip row1.txt row2.txt

$ zipinfo rows.zip
Archive:  rows.zip
Zip file size: 355 bytes, number of entries: 2
-rw-rw-r--  3.0 unx       23 bx stor 17-Dec-27 11:55 row1.txt
-rw-rw-r--  3.0 unx       22 bx stor 17-Dec-27 09:40 row2.txt
2 files, 45 bytes uncompressed, 45 bytes compressed:  0.0%

Perhaps newline is a quirk of zip itself.  String "text of file row1.txt"
is 21 characters.

Peter
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to