From mboxrd@z Thu Jan 1 00:00:00 1970 From: Per Bothner Subject: Re: Any interest in using HTML for locally-installed Texinfo documentation? Date: Wed, 3 Apr 2019 15:44:57 -0700 Message-ID: References: <87a7h8u4r4.fsf@gnu.org> <87ef6ipzef.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <87ef6ipzef.fsf@gnu.org> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-texinfo-bounces+gnu-bug-texinfo2=m.gmane.org@gnu.org Sender: "bug-texinfo" To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= Cc: guix-devel@gnu.org, Texinfo List-Id: guix-devel.gnu.org On 4/3/19 2:11 PM, Ludovic Courtès wrote: >> What I do for the Kawa manual is generate an 'epub' archive, which is >> basically a zip archive, with compression. It is fairly simple for a >> web server to extract a zip member and send it to a browser directly >> as a gzip-compressed file, without actually decompressing the file >> (until it gets to the browser). I contributed support for this to >> https://libwebsockets.org/, which is a compact C-language http server. >> DomTerm uses this to "serve" the JavaScript files to the browser, >> and a revamped 'info' program could do the same. > > A simpler solution might be to use ‘Content-Encoding: gzip’. That is what libwebsockets does given a zip archive (and a browser that can handle Content-Encoding: gzip). There is a little bit of header munging, but it turns out the the compression used for a member of a zip archive is exactly the same as used by ‘Content-Encoding: gzip’. So the web server can extract the compressed data from the zip archive and send it directly to the browser without having to decompress and then re-compress it. DomTerm does the same for its JavaScript and css files: They're installed as a zip archive, and the domterm command (using libwebsockets) starts up a browser window with a URL pointing back at itself. When files are requested it can send them to the browser as ‘Content-Encoding: gzip’, without having to uncompress them first. -- --Per Bothner per@bothner.com http://per.bothner.com/