压缩程序:
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include "jbig.h"
#include "mex.h"
#include "jbig1.h"
#include "jbig_ar1.h"
unsigned char *testbuf;
long testbuf_len,TESTBUF_SIZE;
static void output_bie(unsigned char *start, size_t len, void *file)
{
printf("\n%d\n",7);
printf("\n%d\t%d",len,testbuf_len);
if (testbuf_len < TESTBUF_SIZE) {
if (testbuf_len + len < TESTBUF_SIZE)
memcpy(testbuf + testbuf_len, start, len);
else
memcpy(testbuf + testbuf_len, start, TESTBUF_SIZE - testbuf_len);
}
testbuf_len += len;
(void) file;
return;
}
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
unsigned char