File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,17 @@ def to_str
95
95
expect ( Zstd . decompress ( simple_compressed ) . force_encoding ( 'UTF-8' ) . hash ) . to eq ( Zstd . decompress ( streaming_compressed ) . force_encoding ( 'UTF-8' ) . hash )
96
96
end
97
97
98
+ it 'shoud work with large streaming compress data' do
99
+ large_strings = Random . bytes ( 1 <<16 )
100
+ stream = Zstd ::StreamingCompress . new
101
+ res = stream . compress ( large_strings )
102
+ res << stream . flush
103
+ res << stream . compress ( large_strings )
104
+ res << stream . compress ( large_strings )
105
+ res << stream . finish
106
+ expect ( Zstd . decompress ( res ) ) . to eq ( large_strings * 3 )
107
+ end
108
+
98
109
it 'should raise exception with unsupported object' do
99
110
expect { Zstd . decompress ( Object . new ) } . to raise_error ( TypeError )
100
111
end
You can’t perform that action at this time.
0 commit comments