JBIG2压缩实例(C、Matlab混合编程)

  • Post author:
  • Post category:其他


压缩程序:

#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



版权声明:本文为wzr1201原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。