Jonathan Dieter [Wed, 6 Jun 2018 06:46:20 +0000 (09:46 +0300)]
Make functions that aren't used outside of file static and remove unused
functions
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 6 Jun 2018 06:34:46 +0000 (09:34 +0300)]
Change zck_reset_failed_chunks to void
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 6 Jun 2018 06:34:23 +0000 (09:34 +0300)]
Remove extra logging and simplify code
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 5 Jun 2018 18:23:14 +0000 (21:23 +0300)]
Remove some functions that shouldn't be public and bump to 0.6.0
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 5 Jun 2018 18:22:50 +0000 (21:22 +0300)]
All non-public functions shouldn't start with zck_*
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 5 Jun 2018 12:15:02 +0000 (15:15 +0300)]
Move download API to zck_dl.c
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 5 Jun 2018 11:11:51 +0000 (14:11 +0300)]
Change zck_range_close to zck_range_free and fix zck_get_dl_range
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 5 Jun 2018 11:11:07 +0000 (14:11 +0300)]
Fix various bugs in download code
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 5 Jun 2018 11:10:47 +0000 (14:10 +0300)]
Remove unneeded copy_index_item function
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 5 Jun 2018 11:09:35 +0000 (14:09 +0300)]
Fix IndexItem->valid so it is either -1 (failed), 0 (missing) or 1 (good)
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 5 Jun 2018 11:08:52 +0000 (14:08 +0300)]
Fix memory leak
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 5 Jun 2018 11:08:14 +0000 (14:08 +0300)]
Some new functions and cleanup of old functions
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 4 Jun 2018 07:48:16 +0000 (10:48 +0300)]
Modify zckdl so it does the curl calls itself
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 4 Jun 2018 07:47:51 +0000 (10:47 +0300)]
API revamp to give control over the actual download to the program
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 4 Jun 2018 07:46:11 +0000 (10:46 +0300)]
New functions and rework zck_get_header_length so it works after only the
lead has been read
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 4 Jun 2018 07:45:10 +0000 (10:45 +0300)]
Rework function that was only used by zckdl
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 4 Jun 2018 07:43:54 +0000 (10:43 +0300)]
Add function for copying an index item (used to for mapping from an old
zchunk to a new)
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 4 Jun 2018 07:43:00 +0000 (10:43 +0300)]
Change how headers are read. Full lead must be read in one go.
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 4 Jun 2018 05:16:48 +0000 (08:16 +0300)]
Break regex generation into separate function
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 4 Jun 2018 05:12:48 +0000 (08:12 +0300)]
Move curl dependency to just zckdl
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 4 Jun 2018 05:12:02 +0000 (08:12 +0300)]
Header checksum and header size were in the wrong order
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 31 May 2018 07:08:49 +0000 (10:08 +0300)]
Make error message more accurate when digest size is incorrect
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 31 May 2018 07:05:36 +0000 (10:05 +0300)]
Fix problems with validating pre-supplied header checksum and length
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 30 May 2018 12:01:30 +0000 (15:01 +0300)]
Add unknown hash type
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 30 May 2018 11:13:59 +0000 (14:13 +0300)]
We now verify whether options are valid for reading or writing
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 30 May 2018 11:01:35 +0000 (14:01 +0300)]
Add support for specifying header information before reading file
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 21 May 2018 18:39:50 +0000 (21:39 +0300)]
Add new argument to zck_read_header to validate zchunk file
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 21 May 2018 18:39:23 +0000 (21:39 +0300)]
Revamp chunk validation functions and add new public function to check full
file checksums
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 21 May 2018 18:36:57 +0000 (21:36 +0300)]
Rename zckIndexItem.finished to zckIndexItem.valid
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 21 May 2018 18:34:53 +0000 (21:34 +0300)]
Move buffer size into util_common.h
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 21 May 2018 18:34:13 +0000 (21:34 +0300)]
Output logging to stderr instead of stdout
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 21 May 2018 18:33:45 +0000 (21:33 +0300)]
Get rid of unused return
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 16 May 2018 07:59:56 +0000 (10:59 +0300)]
Apparently spaces matter
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 16 May 2018 07:56:48 +0000 (10:56 +0300)]
Update README.md
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 10 May 2018 11:42:12 +0000 (14:42 +0300)]
Bump to 0.5.2
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 10 May 2018 11:41:55 +0000 (14:41 +0300)]
Change zck_range_get_char to not output header beginning
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 10 May 2018 11:16:49 +0000 (14:16 +0300)]
Bump to 0.5.1 with new zck_get_range() function
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 10 May 2018 11:15:40 +0000 (14:15 +0300)]
Add function to get range string from start and end location
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 9 May 2018 16:49:41 +0000 (19:49 +0300)]
Bump to 0.5.0 with proper command line utilities
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 9 May 2018 16:22:46 +0000 (19:22 +0300)]
Move dictionary decompression from zck_read_header to zck_read
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Sun, 6 May 2018 14:10:58 +0000 (17:10 +0300)]
Get rid of warning about stripping '\0' from strncpy
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 4 May 2018 15:13:31 +0000 (18:13 +0300)]
Fix incomplete conversion to argp
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 4 May 2018 15:09:02 +0000 (18:09 +0300)]
Make zck_delta_size a proper utility with arguments and help.
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 4 May 2018 15:08:45 +0000 (18:08 +0300)]
Make zck_read_header a proper utility with arguments and help.
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 4 May 2018 15:08:26 +0000 (18:08 +0300)]
Make zckdl a proper utility with arguments and help.
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 4 May 2018 14:27:09 +0000 (17:27 +0300)]
Make unzck a proper utility with arguments and help.
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 4 May 2018 14:25:57 +0000 (17:25 +0300)]
Split common utility functions out of individual utilities
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 3 May 2018 19:52:11 +0000 (22:52 +0300)]
Make zck a proper utility with arguments and help. Still needs some work
on splitting strings.
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 3 May 2018 19:51:01 +0000 (22:51 +0300)]
Make zck_get_data_length public (like it should be anyway) and fix some
header stuff
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 3 May 2018 19:50:09 +0000 (22:50 +0300)]
Increase buzhash width and remove typo
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 3 May 2018 08:00:11 +0000 (11:00 +0300)]
Buzhash integration into zck and some small changes to make buzhash work
correctly
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 3 May 2018 07:57:55 +0000 (10:57 +0300)]
Add buzhash from urlblock (under MIT license)
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 30 Apr 2018 06:41:26 +0000 (09:41 +0300)]
Update documentation for zchunk format
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Sun, 29 Apr 2018 19:17:33 +0000 (22:17 +0300)]
Release version 0.4.0 with (hopefully) final incompatible file format
changes
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Sun, 29 Apr 2018 18:15:24 +0000 (21:15 +0300)]
Revamp file structure one last (hopefully) time so we can check the header
checksum without reading the whole header into memory in one go
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 24 Apr 2018 06:19:30 +0000 (09:19 +0300)]
Add comments to first test
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Sat, 21 Apr 2018 11:25:52 +0000 (14:25 +0300)]
Add first test
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Sat, 21 Apr 2018 11:25:04 +0000 (14:25 +0300)]
Rework build files so we can do testing
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Sat, 21 Apr 2018 11:24:29 +0000 (14:24 +0300)]
Turn off debugging when reading zchunk header
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 20 Apr 2018 17:36:54 +0000 (20:36 +0300)]
Bump to 0.3.0 with file format changes
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 20 Apr 2018 17:35:17 +0000 (20:35 +0300)]
Fix memory leak with full data hash
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 20 Apr 2018 17:27:20 +0000 (20:27 +0300)]
Add zchunk format description
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 20 Apr 2018 17:23:05 +0000 (20:23 +0300)]
Change file format to support streams and signatures
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 19 Apr 2018 12:03:42 +0000 (15:03 +0300)]
Fix return value
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Thu, 19 Apr 2018 09:35:26 +0000 (12:35 +0300)]
Rename zck_read_index_hash to the more accurate zck_read_header_hash
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 17 Apr 2018 13:30:03 +0000 (16:30 +0300)]
Bump to 0.2.2
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 17 Apr 2018 13:25:39 +0000 (16:25 +0300)]
Get rid of warnings on EL7 gcc
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 17 Apr 2018 11:11:18 +0000 (14:11 +0300)]
Cast size_t to unsigned long and ssize_t to long so we don't get warnings
with 32-bit architectures
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 17 Apr 2018 10:57:34 +0000 (13:57 +0300)]
We use some gnu99 options, so set gnu99
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 17 Apr 2018 10:54:51 +0000 (13:54 +0300)]
Fix off by one error
Jonathan Dieter [Tue, 17 Apr 2018 10:54:23 +0000 (13:54 +0300)]
Make sure we hand invalid reads in zck tool
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 17 Apr 2018 09:28:59 +0000 (12:28 +0300)]
Bump to 0.2.1
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 17 Apr 2018 09:28:34 +0000 (12:28 +0300)]
Make sure we're using all function results
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 17 Apr 2018 09:28:00 +0000 (12:28 +0300)]
Give all functions warn_unused_result and make sure warnings are turned on
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 17 Apr 2018 07:18:32 +0000 (10:18 +0300)]
Bump release to 0.2.0
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 16 Apr 2018 12:17:04 +0000 (15:17 +0300)]
End chunk when closing zchunk file that was open for writing
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 16 Apr 2018 09:42:52 +0000 (12:42 +0300)]
Reorganize header so download stuff is at the end
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 16 Apr 2018 09:40:35 +0000 (12:40 +0300)]
Revamp how options are set
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Sun, 15 Apr 2018 18:46:16 +0000 (21:46 +0300)]
Change zck_get_index_digest and zck_get_data_digest to return string
version of digest and make sure digest isn't cleared after closing file
for writing
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Sun, 15 Apr 2018 18:44:45 +0000 (21:44 +0300)]
Make set_comp_parameter parameter const
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 13 Apr 2018 11:05:32 +0000 (14:05 +0300)]
Only make API functions public using -fvisibility
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 11 Apr 2018 17:13:21 +0000 (20:13 +0300)]
Make binaries work with dict change
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 11 Apr 2018 17:12:58 +0000 (20:12 +0300)]
Finish last commit
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 11 Apr 2018 16:56:57 +0000 (19:56 +0300)]
When setting compression dictionary, make immediate copy
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 10 Apr 2018 15:10:43 +0000 (18:10 +0300)]
Make sure executables get installed
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 10 Apr 2018 13:00:04 +0000 (16:00 +0300)]
Add ability to get index based on file location
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 10 Apr 2018 12:59:43 +0000 (15:59 +0300)]
Rewrite binaries to use new API
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 10 Apr 2018 12:59:18 +0000 (15:59 +0300)]
Reorganize the main header so it's easier to understand
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 10 Apr 2018 12:57:19 +0000 (15:57 +0300)]
Massive work changing API to support zck_read and zck_write functions
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Wed, 4 Apr 2018 07:30:08 +0000 (10:30 +0300)]
Rename dl.c/write_data to dl.c/dl_write_data as we use write_data()
elsewhere
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 3 Apr 2018 10:02:26 +0000 (13:02 +0300)]
Rename zck_compress to zck_write and zck_decompress to zck_read and
reorder some functions in comp.c
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Tue, 3 Apr 2018 07:20:01 +0000 (10:20 +0300)]
Rename io functions
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 26 Mar 2018 19:05:01 +0000 (22:05 +0300)]
When compressing file, automatically start compression if it hasn't already
been started.
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 26 Mar 2018 09:30:07 +0000 (12:30 +0300)]
Remove infinite loop if there's no dict in file
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Mon, 26 Mar 2018 09:29:50 +0000 (12:29 +0300)]
Fix compression so it works correctly if there's no dict
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Sat, 24 Mar 2018 14:54:19 +0000 (16:54 +0200)]
Change compression so it's streamed. Decompression is still on a chunk-by-
chunk basis.
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 23 Mar 2018 13:36:46 +0000 (15:36 +0200)]
Switch to multi-step chunk addition to pave the way for streaming
compression
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 23 Mar 2018 11:51:24 +0000 (13:51 +0200)]
Store uncompressed size in index
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 23 Mar 2018 10:48:10 +0000 (12:48 +0200)]
Change name of compressed length in index to comp_length in preparation
for adding uncompressed length
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Jonathan Dieter [Fri, 23 Mar 2018 10:35:55 +0000 (12:35 +0200)]
Make a number of zckDL fields private
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>