?
ich habe in meiner LZ77.h unteranderem folgendes:
FILE *infile;
FILE *outfile;
//...
void LZ77_EncodeFile(char *input, char *output) {
infile = fopen(input, "rb");
outfile = fopen(output, "wb");
setvbuf( infile, NULL, _IOFBF, 4096);
setvbuf( outfile, NULL, _IOFBF, 4096);
LZ77_Encode();
fclose(infile);
fclose(outfile);
}
//---------------------------------------------------------------------------
void LZ77_EncodeFileToStream(char *input, FILE *output) {
infile = fopen(input, "rb");
outfile = output;
setvbuf( infile, NULL, _IOFBF, 4096);
setvbuf( outfile, NULL, _IOFBF, 4096);
LZ77_Encode();
fclose(infile);
}
Nun mach ich folgendes:
LZ77_EncodeFile("brick.bmp", "brick.lzf");
//Könnte ich auch öfters hier machen, brick.lzf währe immer gleich!
FILE *ff = fopen("brick2.lzf", "wb");
LZ77_EncodeFileToStream("brick.bmp", ff);
fclose(ff);
//Mach ich diesen Pack öfters währe die brick2.lzf immer gleich.
Wenn ich wollte könnte ich die Reihenfolge hier auch ändern, trotzdem folgendes Problem:
Jedoch sind beide lzf Dateien total unterschiedlich. Unter Borland C++ lief alles bestens, mit Visual C++ nicht. Kann mir wer nen Tipp geben woran das liegen könnte?
MfG
Benjamin