unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Kenichi Handa <handa@m17n.org>
Cc: emacs-pretest-bug@gnu.org, eliz@gnu.org,
	christopher.ian.moore@gmail.com, monnier@iro.umontreal.ca
Subject: Re: jka-compr.el doesn't recognise gzipped files from their magic	bytes
Date: Fri, 21 Sep 2007 15:21:03 +0900	[thread overview]
Message-ID: <87wsuk1quo.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <E1IYamA-0002Gd-Ir@etlken.m17n.org>

Kenichi Handa writes:

 > Sorry, I have not followed this thread.  Could someone
 > please explain how CCL is related here?

I'm drawing an analogy between (1) looking at a text stream (process
or file) with autodetection, then decoding the text accroding to the
detected coding system, and (2) looking at the magic in a file, and
decoding it according to that magic.  The example of (2) discussed
here is a gzipped stream.  The problem to solve is that jka-compr
doesn't recognize such a stream unless it's a file with a name with
.gz extension.

Eli claims that looking at magic and then decoding the file would
necessarily introduce a lot of overhead, and I say that that is not
true, because it's not true for autodetected coding systems.

I also claim that for coding that can be implemented inside of Emacs,
the coding system framework could be adapted to this (or perhaps even
used directly, Ben Wing has demonstrated this in XEmacs with zlib, but
XEmacs is a quite different implementation from current Emacs).

The point about CCL is simply that a CCL coding system is completely
separate from the detector, and so must work on buffered input.  You
have to be able to seek to the beginning of the input stream and then
translate it.

  reply	other threads:[~2007-09-21  6:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17 19:28 jka-compr.el doesn't recognise gzipped files from their magic bytes Chris Moore
2007-09-17 20:29 ` Eli Zaretskii
2007-09-18  3:35   ` Stephen J. Turnbull
2007-09-18  4:14     ` Eli Zaretskii
2007-09-18  5:49       ` Stephen J. Turnbull
2007-09-18 19:32         ` Eli Zaretskii
2007-09-19  3:55           ` Stephen J. Turnbull
2007-09-19 18:43             ` Eli Zaretskii
2007-09-20 18:53               ` Stephen J. Turnbull
2007-09-20 19:06                 ` Stefan Monnier
2007-09-20 23:24                   ` Stephen J. Turnbull
2007-09-21  3:35                     ` Stefan Monnier
2007-09-21  5:00                       ` Stephen J. Turnbull
2007-09-21  5:10                         ` Kenichi Handa
2007-09-21  6:21                           ` Stephen J. Turnbull [this message]
2007-09-21  7:41                             ` Kenichi Handa
2007-09-17 21:50 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wsuk1quo.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=christopher.ian.moore@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=handa@m17n.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).