Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Stream closes after serialization with GZip compression #673

@ar7z1

Description

@ar7z1

When I call method

Accord.IO.Serializer.Save<T>(this T obj, Stream stream, SerializerCompression compression = DEFAULT_COMPRESSION)

with compression = SerializerCompression.GZip, the stream object closes. And when I try to read serialized content from that stream, I get the exception:

System.ObjectDisposedException : Cannot access a closed Stream.
   at System.IO.__Error.StreamIsClosed()
   at System.IO.MemoryStream.set_Position(Int64 value)
   at Accord.Tests.SerializerTest.compression_test_stream() in C:\Users\art\projects\github\accord.net\Unit Tests\Accord.Tests.Core\SerializerTest.cs:line 166

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions