view dmbstr.h @ 811:aebc2f8b2c2d

Add some comments.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 16 May 2014 03:01:51 +0300
parents c63e24f9aa9a
children
line wrap: on
line source

/*
 * DMLib
 * -- Simple bitstream I/O functions
 * Programmed and designed by Matti 'ccr' Hamalainen
 * (C) Copyright 2012 Tecnic Software productions (TNSP)
 */
#ifndef DMBSTR_H
#define DMBSTR_H

#include "dmlib.h"

typedef struct _DMBitStreamContext
{
  void *fp;
  int (*putByte)(struct _DMBitStreamContext *ctx, Uint8 val);

  int buf, bitcnt, bytecnt;
} DMBitStreamContext;


void  dmInitBitStreamContext(DMBitStreamContext *ctx);
BOOL  dmPutBits(DMBitStreamContext *ctx, const int val, const int n);
int   dmFlushBitStream(DMBitStreamContext *ctx);

int   dmInitBitStreamFILE(DMBitStreamContext *ctx, FILE *fp);


#ifdef __cplusplus
}
#endif
#endif // DMBSTR_H