@@ -72,7 +72,7 @@ malfomed data from `source`. However, this method must not throw `EOFError`
72
72
when reading data from `source`. Also note that it is responsible for this
73
73
method to release resources allocated by `codec` when an exception happens.
74
74
"""
75
- function process (:: Type{Read} , codec:: Codec , stream :: IO , data :: Ptr{UInt8} , nbytes:: Int )
75
+ function process (:: Type{Read} , codec:: Codec , source :: IO , input :: Ptr{UInt8} , nbytes:: Int )
76
76
error (" codec $(codec) does not implement read mode" )
77
77
end
78
78
@@ -84,9 +84,12 @@ Transcode data using `codec` with write mode.
84
84
<> <-----(transcode)-----< [.......]
85
85
sink codec input
86
86
87
- This method reads some data from `input` and write the transcoded bytes to `sink`.
87
+ This method reads some data from `input` and write the transcoded bytes to
88
+ `sink` at most `nbytes`, and then returns the number of written bytes and an
89
+ appropriate return code. It can assume `input` points to a valid memory position
90
+ and `nbytes` is positive.
88
91
"""
89
- function process (:: Type{Write} , codec:: Codec , stream :: IO , data :: Ptr{UInt8} , nbytes:: Int )
92
+ function process (:: Type{Write} , codec:: Codec , sink :: IO , input :: Ptr{UInt8} , nbytes:: Int )
90
93
error (" codec $(codec) does not implement write mode" )
91
94
end
92
95
0 commit comments