/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*******************************************************************************
 *              Copyright 2000,2001,2002,2003 Element 14 Inc                   *
 *                                                                             *
 * This material is the confidential trade secret and proprietary information  *
 * of Element 14 Inc.  It may not be reproduced, used, sold or transferred to  *
 * any third party  without the prior written  consent of Element 14 Inc. All  *
 * rights reserved.                                                            *
 *                                                                             *
 ******************************************************************************/

/* $Id: bcm_lz77.h,v 1.2 2004/11/10 14:32:25 eduymeli Exp $  */

#ifndef BCM_LZ77_H
#define BCM_LZ77_H


#include "bcm_userdef.h"

/**
 * An LZ77 writer decompresses an LZ77 encoded datastream and sends
 * it byte-by-byte to a writer.
 */
typedef struct {
  uint8 * data;
  uint8 * currPtr;
  uint32  i, j, k;
  Bool longCopy, done;
  uint32 dataAvailable;
} Lz77;

/**
 * Initialise the object for decompression of a
 * data stream.
 */
void Lz77_init(Lz77 *self, uint8 *data);

/**
 * Get one byte from the compressed stream.
 */
int Lz77_getByte(Lz77 *self, uint8 *data);
#endif
