Skip to content

Commit

Permalink
Added a 'magic' file to identify index files with file command
Browse files Browse the repository at this point in the history
  • Loading branch information
circulosmeos committed Apr 19, 2020
1 parent aa81ffc commit d2590de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
==============

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
===============================================================

Expand Down Expand Up @@ -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).

Expand Down
5 changes: 5 additions & 0 deletions magic
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d2590de

Please sign in to comment.