File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ function ZstdCompression(;level::Integer=DEFAULT_COMPRESSION_LEVEL)
2525 return ZstdCompression (CStream (), level)
2626end
2727
28- const ZstdCompressionStream{S} = TranscodingStream{ZstdCompression,S}
28+ const ZstdCompressionStream{S} = TranscodingStream{ZstdCompression,S} where S <: IO
2929
3030"""
3131 ZstdCompressionStream(stream::IO; kwargs...)
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function ZstdDecompression()
1414 return ZstdDecompression (DStream ())
1515end
1616
17- const ZstdDecompressionStream{S} = TranscodingStream{ZstdDecompression,S}
17+ const ZstdDecompressionStream{S} = TranscodingStream{ZstdDecompression,S} where S <: IO
1818
1919"""
2020 ZstdDecompressionStream(stream::IO)
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ import TranscodingStreams
77 @test read (ZstdDecompressionStream (IOBuffer (data))) == b " foo"
88 @test read (ZstdDecompressionStream (IOBuffer (vcat (data, data)))) == b " foofoo"
99
10+ @test ZstdCompressionStream <: TranscodingStreams.TranscodingStream
11+ @test ZstdDecompressionStream <: TranscodingStreams.TranscodingStream
12+
1013 TranscodingStreams. test_roundtrip_read (ZstdCompressionStream, ZstdDecompressionStream)
1114 TranscodingStreams. test_roundtrip_write (ZstdCompressionStream, ZstdDecompressionStream)
1215 TranscodingStreams. test_roundtrip_lines (ZstdCompressionStream, ZstdDecompressionStream)
You can’t perform that action at this time.
0 commit comments