79163184

Date: 2024-11-06 15:13:34
Score: 1
Natty:
Report link

Thanks to Jimi for his comment to use the CopyTo() method instead! New function:

Public Function Decompress(ByVal bSource As Byte()) As MemoryStream ' Byte()
    Dim inStream As New MemoryStream(bSource)
    Dim gzip As New GZipStream(inStream, CompressionMode.Decompress)
    Dim outStream As New MemoryStream()
    gzip.CopyTo(outStream)
    Return outStream
End Function
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Dan H.