Winter IsPretty
Winter IsPretty

Reputation: 1

Why does my FileStream.Read only output zeros and doesn't read the file

The code below is only outputting zeros when the first byte should give at least 93 and 32 based on the file it writes, but it doesn't even give the number of bytes it reads from the file it makes/edits and the bytes are shown

Stream

for (int i = 0; i < size; i++) LZMA[i] = database[i + place];
//uses bytes from another file to get LZMA code

FileStream LZMAFILE = File.Create("LZMAStream.lzma");
//Creates file

LZMAFILE.Write(LZMA);
//writes bytes to file (linked above)

//now I check to see if it can read my file
byte[] properties = new byte[5];
//makes properties array

int bruh = LZMAFILE.Read(properties, 0, 5);
//reads array and gives number of bytes

//returns 0 for everything therefore the dll down there doesn't work

LZMACoder.Decompress(LZMAFILE);

Upvotes: 0

Views: 410

Answers (0)

Related Questions