From d2590dea6bb5ed96ec2eb65720f2c5001c4e2c2d Mon Sep 17 00:00:00 2001 From: circulosmeos Date: Sun, 19 Apr 2020 22:29:33 +0200 Subject: [PATCH] Added a 'magic' file to identify index files with `file` command --- README.md | 8 ++++++-- magic | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 magic diff --git a/README.md b/README.md index 087f774..a20b85a 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ No more waiting when the end of a 10 GiB gzip is needed! See [`Installation`](https://github.com/circulosmeos/gztool#installation) for Ubuntu, the [Release page](https://github.com/circulosmeos/gztool/releases) for executables for your platform, and [`Compilation`](https://github.com/circulosmeos/gztool#compilation) in case you want to compile the tool. +Also, a *`magic`* file to correctly identify `gztool`'s index files with linux `file` command is provided: you can append it (or overwrite your empty) `/etc/magic` file or append/copy it to your home directory as `~/.magic` (note the point prepending the name). + Considerations ============== @@ -86,7 +88,7 @@ Copy gztool.c to the directory where you compiled zlib, and do: Usage ===== - gztool (v0.11.1) + gztool (v0.11.2) GZIP files indexer, compressor and data retriever. Create small indexes for gzipped files and use them for quick and random positioned data extraction. @@ -313,6 +315,8 @@ With 64 bit long numbers, the index could potentially manage files up to 2^64 = Regarding line number counting (`-[xX]`), note that gztool's index counts last line in uncompressed data even if the last char isn't a newline char - whilst `wc` command will not count it in this case!. Nonetheless, line counting when extracting data with `-[bLtT]` does follow `wc` convention - this is in order to not obtain different (+/-1) results reading `gztool` output info and `wc` counts. +A *`magic`* file to correctly identify `gztool`'s index files with linux `file` command is provided: you can append it (or overwrite your empty) `/etc/magic` file or append/copy it to your home directory as `~/.magic` (note the point prepending the name). + Other tools which try to provide random access to gzipped files =============================================================== @@ -354,7 +358,7 @@ Other interesting links Version ======= -This version is **v0.11.1**. +This version is **v0.11.2**. Please, read the *Disclaimer*. This is still a beta release. In case of any errors, please open an [issue](https://github.com/circulosmeos/gztool/issues). diff --git a/magic b/magic new file mode 100644 index 0000000..ccfe7df --- /dev/null +++ b/magic @@ -0,0 +1,5 @@ +# Magic local data for file(1) command. +# Insert here your local magic data. Format is described in magic(5). + +0 string \0\0\0\0\0\0\0\0gzipindx GZIP index file (v0), usable with gztool +0 string \0\0\0\0\0\0\0\0gzipindX GZIP index file (v1) with line info, usable with gztool