I know that to add a mimetype whose file extension is used for other mimetype I can use magic like that:
<mime-type type="audio/x-gtp">
<magic priority="50">
<match value="BCFZ" type="string" offset="0" />
</magic>
<glob pattern="*.gpx"/>
</mime-type>
This means that always the first four characters of audio/x-gtp file are BCFZ, and in effect it is so.
But with other file type (that is the same as .gpx but in other program version) whose file-extension is .gp, there is not a printable pattern at the beginning of the file.
I show you, the output of four first lines of hexdump of the .gp file:
hexdump -C /home/cactus/Descargas/arpeggio.gp | head -4
00000000 50 4b 03 04 14 00 00 00 00 00 00 00 00 00 00 00 |PK..............|
00000010 00 00 00 00 00 00 00 00 00 00 08 00 00 00 43 6f |..............Co|
00000020 6e 74 65 6e 74 2f 50 4b 03 04 14 00 08 00 08 00 |ntent/PK........|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
As you can see, the first characters are not printable, so I want the pattern to be Content/PK. I think I can get to this character using offset, like offset=10 but I don't know what represents the number, and how use it.
Thanks