Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!axion!tharr!gtoal From: gtoal@tharr.UUCP (Graham Toal) Newsgroups: comp.compression Subject: Re: Y coding Message-ID: <2159@tharr.UUCP> Date: 18 May 91 19:56:04 GMT References: <1991May8.194136.3683@doc.ic.ac.uk> <26227:May1416:59:4091@kramden.acf.nyu.edu> Reply-To: gtoal@tharr.UUCP (Graham Toal) Organization: Public Usenet Access Lines: 36 In article <26227:May1416:59:4091@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: :In article <1991May8.194136.3683@doc.ic.ac.uk> ra2@doc.ic.ac.uk (Roger Attrill) writes: :> Sorry if this has been asked before, but I've been absent from the group :> for a while. Does anyone have some code - preferably C - implementing :> the Y coding which was described here some time ago. : :The reference implementation of Y coding is my yabbawhap package, in :comp.sources.unix volume 24. The source is in C, and it's been reported :to work under a variety of UNIX and non-UNIX systems. Dan - has anyone hacked yabba yet so that it can be used as an encapsulated part of other programs - for instance, an interface like 'init_yabba(); compress_yabba(inblock, insize, outblock, &outsize); terminate_yabba()' would be ideal! (to fit in my program :-) ) I've almost finished a shell for compression algorithms, which is a layer of procedures on top of stdio.h -- fopen(file, mode) for example would open a compressed file, which you could then read from with fread(). The compressed file is compressed in blocks, and there is a spine-block for fast access to random bytes within the file. The compression is totally transparent; for instance seeking to the end of the file and doing an ftell() returns the size of the expanded file. (If you use the fake fopen() (which is a macro calling qfopen() ), and the file doesn't have a compressed magic number, you'll still be able to read it with the fake calls - at the lowish cost of one extra level of procedure entry) I'd quite like to include yabba as one of the base compression algorithms, hence why I'm asking if anyone has mangled it into a blocked interface... Regards Graham -- (* Posted from tharr.uucp - Public Access Unix - +44 (234) 841503 *)