File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -1186,10 +1186,19 @@ of an additional operation:
11861186 encoded representation is a byte string, then ``decoded_regions ``
11871187 specifies a list of byte ranges.
11881188
1189- - ``c.compute_encoded_size(input_size) ``, a procedure that determines the byte
1190- size of the encoded representation given a byte size of the decoded representation.
1189+ - ``c.compute_encoded_size(input_size) ``, a procedure that determines the
1190+ size of the encoded representation given a size of the decoded representation.
11911191 This procedure cannot be implemented for codecs that produce variable-sized
1192- encoded representations, such as compression algorithms.
1192+ encoded representations, such as compression algorithms. Depending on the
1193+ type of the codec, the signature could differ:
1194+
1195+ - ``c.compute_encoded_size(array_size, dtype) -> (array_size, dtpye) ``
1196+ for ``array -> array `` codecs, where ``array_size `` is the number of items
1197+ in the array, i.e., the product of the components of the array's shape;
1198+ - ``c.compute_encoded_size(array_size, dtype) -> byte_size ``
1199+ for ``array -> bytes `` codecs;
1200+ - ``c.compute_encoded_size(byte_size) -> byte_size ``
1201+ for ``bytes -> bytes `` codecs.
11931202
11941203.. note ::
11951204
You can’t perform that action at this time.
0 commit comments