MPIon
Well-known member
I have been using GZipStream with Net Framework 4.8 successfully to read compressed blocks (40,000 bytes) into memory.
Now that I have moved to Net 7, it does not seem to read the whole block successfully. It is exactly the same code.
I have analyzed the data and is seems to read bytes 0 to 32801 the same, but beyond that, they are all zero.
(thought I was onto something when I got near to examining bytes beyond 32767, but that can't be it as it reads to 32801).
Unfortunately I can't change the block size to something smaller as the files have already been created with blocks of 40,000 bytes and would take weeks to recreate at smaller size.
This could be a show stopper unless I can fix it.
Anyone had this problem before or could shed any light on it? Maybe Net 7 has a newer Uncompress class?
C#:
fs.Seek(offset, SeekOrigin.Begin);
GZipStream zs = new GZipStream(fs, CompressionMode.Decompress, true);
zs.Read(block[blockNo]!, 0, 40000);
zs.Close();
fs.Close();
I have analyzed the data and is seems to read bytes 0 to 32801 the same, but beyond that, they are all zero.
(thought I was onto something when I got near to examining bytes beyond 32767, but that can't be it as it reads to 32801).
Unfortunately I can't change the block size to something smaller as the files have already been created with blocks of 40,000 bytes and would take weeks to recreate at smaller size.
This could be a show stopper unless I can fix it.
Anyone had this problem before or could shed any light on it? Maybe Net 7 has a newer Uncompress class?