Return-Path: <owner-tiff@olympiakos.com>
Received: from nataly.at1895.spb.edu (localhost [127.0.0.1])
	by at1895.spb.edu (8.12.4/8.12.4/Debian-4) with ESMTP id g85E2C18030924
	for <dron@at1895.spb.edu>; Thu, 5 Sep 2002 18:02:12 +0400
Received: from olympiakos.com (uucp@localhost)
	by nataly.at1895.spb.edu (8.12.4/8.12.4/Debian-4) with UUCP id g85E2CIg030920
	for dron@at1895.spb.edu; Thu, 5 Sep 2002 18:02:12 +0400
Received: from knot.pu.ru (knot.pu.ru [193.124.85.214] (may be forged))
	by wg.pu.ru (8.9.1a/8.9.1) with ESMTP id NAA22991
	for <dron@at1895.spb.edu>; Thu, 5 Sep 2002 13:28:51 GMT
Received: from gate7.olympiakos.com (sdsl-64-32-199-150.dsl.iad.megapath.net [64.32.199.150])
	by knot.pu.ru (8.9.3/8.9.0) with ESMTP id RAA00895
	for <dron@at1895.spb.edu>; Thu, 5 Sep 2002 17:28:50 +0400 (MSD)
Received: from localhost (daemon@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id JAA31067;
	Thu, 5 Sep 2002 09:25:47 -0400
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Thu, 5 Sep 2002 09:17:28 -0400
Received: (from majordom@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) id JAA31006
	for tiff-outgoing; Thu, 5 Sep 2002 09:17:28 -0400
X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to owner-tiff@olympiakos.com using -f
Received: from morgoth.tuug.fi (IDENT:postfix@morgoth.tuug.fi [130.232.72.1])
	by gate7.olympiakos.com (8.9.3/8.9.3) with ESMTP id JAA31003
	for <tiff@olympiakos.com>; Thu, 5 Sep 2002 09:17:26 -0400
From: pnielsen@tuug.fi
Received: from tuug.fi (localhost [127.0.0.1])
	by morgoth.tuug.fi (Postfix) with SMTP
	id 7ABCC7F15; Thu,  5 Sep 2002 16:16:25 +0300 (EEST)
Received: from 63.96.6.160
        (SquirrelMail authenticated user pnielsen)
        by www.tuug.fi with HTTP;
        Thu, 5 Sep 2002 16:16:25 +0300 (EEST)
Message-ID: <1516.63.96.6.160.1031231785.squirrel@www.tuug.fi>
Date: Thu, 5 Sep 2002 16:16:25 +0300 (EEST)
Subject: Re: Decode group4
To: janedm@rsv.se
In-Reply-To: <008f01c254c2$941ccfe0$7f08090a@A25463>
References: <008f01c254c2$941ccfe0$7f08090a@A25463>
Cc: tiff@olympiakos.com
X-Mailer: SquirrelMail (version 1.0.6)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: owner-tiff@olympiakos.com
Precedence: bulk
Content-Transfer-Encoding: 8bit
Status: RO
Content-Length: 1289
Lines: 33

> I am currently in the process of creating a class implementation of the
> fax group 4 codec. I have a class namned CCodec with 2 methods Decode
> and Encode. I am focusing on the decoding bit at the moment. I have a
> hypothesis that the Decode method would be sufficently declared as
> follows:  Decode( BYTE* pDest, DWORD dwDestSize, BYTE* pSrc, DWORD
> dwSrcSize, DWORD dwRowSize ); Dest should be uncompressed and Src
> should be compressed.

Janne,

I think that at the very minimum a generic decoder class would need to have 
the following fuctions:

::setDataSource (std::istream& is);   // Set the data source that handles 
feeding of data to the decoder (e.g. reading a file, feeding raw memory, 
reading a socket, or whatever). This could be a custom class or someting as 
simple and standard as a C++ istream.

::decodeRow (BYTE* pData, UINT* uiBytesInOut); // Read one "row" of strip 
or tile data

::skipToEOL ();   // Eat data until the next EOL

::setXXX ()       // Misc functions to configure the decoder, 
e.g. ::setByteAlign (bool set = true); ::setFailOnBadData (bool set = true);

Best regards,
Peter Nielsen



To subscribe or unsubscribe email tiff-request@olympiakos.com with subscribe
or unsubscribe in the email body.  Libtiff home page: http://www.libtiff.org

