Skip to content

Commit b787968

Browse files
authored
Add warning about serialize and deepcopy not being supported (#44)
1 parent 2448703 commit b787968

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/compression.jl

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ Arguments
2626
- `blocksize100k`: block size to be use for compression (1..9)
2727
- `workfactor`: amount of effort the standard algorithm will expend before resorting to the fallback (0..250)
2828
- `verbosity`: verbosity level (0..4)
29+
30+
!!! warning
31+
`serialize` and `deepcopy` will not work with this codec due to stored raw pointers.
2932
"""
3033
function Bzip2Compressor(;blocksize100k::Integer=DEFAULT_BLOCKSIZE100K,
3134
workfactor::Integer=DEFAULT_WORKFACTOR,
@@ -48,6 +51,9 @@ const Bzip2CompressorStream{S} = TranscodingStream{Bzip2Compressor,S} where S<:I
4851
Bzip2CompressorStream(stream::IO; kwargs...)
4952
5053
Create a bzip2 compression stream (see `Bzip2Compressor` for `kwargs`).
54+
55+
!!! warning
56+
`serialize` and `deepcopy` will not work with this stream due to stored raw pointers.
5157
"""
5258
function Bzip2CompressorStream(stream::IO; kwargs...)
5359
x, y = splitkwargs(kwargs, (:blocksize100k, :workfactor, :verbosity))

src/decompression.jl

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ Arguments
2020
---------
2121
- `small`: flag to activate an algorithm which uses less memory
2222
- `verbosity`: verbosity level (0..4)
23+
24+
!!! warning
25+
`serialize` and `deepcopy` will not work with this codec due to stored raw pointers.
2326
"""
2427
function Bzip2Decompressor(;small::Bool=false, verbosity::Integer=DEFAULT_VERBOSITY)
2528
if !(0 verbosity 4)
@@ -36,6 +39,9 @@ const Bzip2DecompressorStream{S} = TranscodingStream{Bzip2Decompressor,S} where
3639
Bzip2DecompressorStream(stream::IO; kwargs...)
3740
3841
Create a bzip2 decompression stream (see `Bzip2Decompressor` for `kwargs`).
42+
43+
!!! warning
44+
`serialize` and `deepcopy` will not work with this stream due to stored raw pointers.
3945
"""
4046
function Bzip2DecompressorStream(stream::IO; kwargs...)
4147
x, y = splitkwargs(kwargs, (:small, :verbosity))

0 commit comments

Comments
 (0)