Article View: comp.sys.mac
Article #16587How does UnpackBits work?
From: Marc Russell Pawliger
Date: Fri, 29 May 1987 20:01
Date: Fri, 29 May 1987 20:01
21 lines
1128 bytes
1128 bytes
I have been trying to implement UnpackBits in c with mediocre success. As I understand it, packbits does the following: Read a byte called control control < 128? Next control+1 bytes are straight bitmap control >= 128? The next byte in the input stream is repeated 256-control times (2s complement of control times) I am able to read in a file I made that consists of straight lines of bitmap, however when I have to read a compressed file (a MacPaint file), the routine gets messed up. Any code fragments greatly appreciated. Marc Pawliger mp1w+@andrew.cmu.edu mp1w@cmuccvma.bitnet
Technical Details
Message-ID:
<UUjSY6y00Vs4AKo08H@andrew.cmu.edu>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!andrew.cmu.edu!mp1w+Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!andrew.cmu.edu!mp1w+ From: mp1w+@andrew.cmu.edu (Marc Russell Pawliger) Newsgroups: comp.sys.mac Subject: How does UnpackBits work? Message-ID: <UUjSY6y00Vs4AKo08H@andrew.cmu.edu> Date: Fri, 29-May-87 16:01:10 EDT Article-I.D.: andrew.UUjSY6y00Vs4AKo08H Posted: Fri May 29 16:01:10 1987 Date-Received: Sat, 6-Jun-87 15:48:26 EDT Organization: Carnegie Mellon University Lines: 21