[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Formatting algorithm, an experiment
From: |
Steffen Nurpmeso |
Subject: |
Re: [Groff] Formatting algorithm, an experiment |
Date: |
Fri, 27 Jun 2014 15:43:24 +0200 |
User-agent: |
s-nail v14.7.1 |
Hello Ralph,
Ralph Corderoy <address@hidden> wrote:
|Hi Steffen,
|
|>> The closest is
|>> http://www.iana.org/assignments/media-types/application/gzip which
|>> leaves the tar for the user to fathom out if left to MIME types
|>> alone.
|>
|> [http://svn.apache.org/viewvc/tika/trunk/tika-core/src/ma\
|> in/resources/org/apache/tika/mime/tika-mimetypes.xml]
|> lists the extension tgz regulary thereunder
|>
|> <mime-type type="application/gzip">
|> <_comment>Gzip Compressed Archive</_comment>
|> <alias type="application/x-gzip"/>
|> <alias type="application/x-gunzip"/>
|> <alias type="application/gzip-compressed"/>
|> <alias type="application/gzipped"/>
|> <alias type="application/gzip-compressed"/>
|> <alias type="application/x-gzip-compressed"/>
|> <alias type="gzip/document"/>
|> <magic priority="45">
|> <match value="\037\213" type="string" offset="0" />
|> <match value="\x1f\x8b" type="string" offset="0" />
|> </magic>
|> <glob pattern="*.tgz" />
|> <glob pattern="*.gz" />
|> <glob pattern="*-gz" />
|> <glob pattern="*.emz" />
|> </mime-type>
|
|Interesting, but the comment seems wrong, since foo.gz need not be an
|archive, i.e. a collection of other things, and it's lumping foo.gz and
|foo.tgz together, so no indication that one of them is a tar file.
it's a community project, some fuzziness seems to be allowed..
Eventually i know of no other source that is so comprehensive.
(And i personally only use the glob entries.)
|MIME types just don't seem to allow layering. That file also has a
We guess the reason for this is to ease processing with handler
chains, i.e., subtype-of-text -> use text handler. Or something
similar.
|couple of tar types.
|
| <mime-type type="application/x-tar">
| <magic priority="40">
| <!-- POSIX tar archive -->
| <match value="ustar\0" type="string" offset="257" />
| </magic>
| <glob pattern="*.tar"/>
| </mime-type>
|
| <mime-type type="application/x-gtar">
| <_comment>GNU tar Compressed File Archive (GNU Tape
Archive)</_comment>
| <magic priority="50">
| <!-- GNU tar archive -->
| <match value="ustar \0" type="string" offset="257" />
| </magic>
| <glob pattern="*.gtar"/>
| <sub-class-of type="application/x-tar"/>
| </mime-type>
|
|The second's comment suggests it's compressed but then it wants `ustar'
|at offset 257 which is uncompressed.
Apart of the comment it (the magic) seems right, however.
|It's a mess. HTTP can ship an application/x-tar with a Content-Encoding
|of gzip, but that's not the same thing as the client should ungzip to
|deliver the tar; not what's wanted.
|
|This seems to be getting off-groff topic. :-)
Oh, after fiddling with unsupported linker options etc. to compile
the showcase i got a SIGBUS. You know, as in "Bus stop, wet day,
she's there" etc. Only the umbrella is still missing.
Ciao,
--steffen
- Re: [Groff] Formatting algorithm, an experiment, Ulrich Lauther, 2014/06/23
- Re: [Groff] Formatting algorithm, an experiment, Doug McIlroy, 2014/06/24
- Re: [Groff] Formatting algorithm, an experiment, Ralph Corderoy, 2014/06/26
- Re: [Groff] Formatting algorithm, an experiment, Peter Schaffter, 2014/06/26
- Re: [Groff] Formatting algorithm, an experiment, Ulrich Lauther, 2014/06/26
- Re: [Groff] Formatting algorithm, an experiment, Ralph Corderoy, 2014/06/26
- Re: [Groff] Formatting algorithm, an experiment, Steffen Nurpmeso, 2014/06/27
- Re: [Groff] Formatting algorithm, an experiment, Ralph Corderoy, 2014/06/27
- Re: [Groff] Formatting algorithm, an experiment,
Steffen Nurpmeso <=
- Re: [Groff] Formatting algorithm, an experiment, Ulrich Lauther, 2014/06/27
- Re: [Groff] Formatting algorithm, an experiment, Steffen Nurpmeso, 2014/06/27
- Re: [Groff] Formatting algorithm, an experiment, Ulrich Lauther, 2014/06/28