-
Notifications
You must be signed in to change notification settings - Fork 1
/
l2.cpp
45 lines (33 loc) · 1.04 KB
/
l2.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// l2.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "dCompress.h"
void dumpbyte(BYTE* buff, int buffSize)
{
for (int i = 0; i < buffSize; i++)
{
printf("0x%02X (\'%c\')\n",buff[i],buff[i]);
}
printf("\n");
}
int main(int argc, char* argv[])
{
BYTE inbuff[] = {"bMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMc" };
BYTE* outbuff;
BYTE* outbuff2;
int inbuffsize = sizeof(inbuff);
int outbuffsize;
int outbuff2size;
printf("Hello World!\n");
dCompress* myComp;
myComp= new dCompress();
printf("First:\n");
dumpbyte(inbuff,inbuffsize);
myComp->cData(inbuff,inbuffsize, &outbuff, &outbuffsize);
printf("Second:\n");
dumpbyte(outbuff,outbuffsize);
myComp->uData(outbuff,outbuffsize,&outbuff2,&outbuff2size);
printf("Third:\n");
dumpbyte(outbuff2,outbuff2size);
return 0;
}