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

Stream closes after serialization with GZip compression #673

Closed
ar7z1 opened this issue Jul 3, 2017 · 0 comments
Closed

Stream closes after serialization with GZip compression #673

ar7z1 opened this issue Jul 3, 2017 · 0 comments

Comments

@ar7z1
Copy link
Contributor

ar7z1 commented Jul 3, 2017

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants