triyng to rice crc32 a bit
parent
ae9bca2b1e
commit
9fea67f3ff
|
@ -27,7 +27,7 @@ TUPLE: buffered-port < port { buffer buffer } ;
|
|||
|
||||
TUPLE: input-port < buffered-port ;
|
||||
|
||||
M: input-port stream-element-type drop +byte+ ;
|
||||
M: input-port stream-element-type drop +byte+ ; inline
|
||||
|
||||
: <input-port> ( handle -- input-port )
|
||||
input-port <buffered-port> ;
|
||||
|
@ -104,7 +104,7 @@ TUPLE: output-port < buffered-port ;
|
|||
[ nip ] [ buffer>> buffer-capacity <= ] 2bi
|
||||
[ drop ] [ stream-flush ] if ; inline
|
||||
|
||||
M: output-port stream-element-type stream>> stream-element-type ;
|
||||
M: output-port stream-element-type stream>> stream-element-type ; inline
|
||||
|
||||
M: output-port stream-write1
|
||||
dup check-disposed
|
||||
|
|
|
@ -33,9 +33,9 @@ INSTANCE: crc32 checksum
|
|||
M: crc32 checksum-bytes
|
||||
init-crc32
|
||||
[ (crc32) ] each
|
||||
finish-crc32 ;
|
||||
finish-crc32 ; inline
|
||||
|
||||
M: crc32 checksum-lines
|
||||
init-crc32
|
||||
[ [ (crc32) ] each CHAR: \n (crc32) ] each
|
||||
finish-crc32 ;
|
||||
finish-crc32 ; inline
|
||||
|
|
|
@ -99,7 +99,7 @@ SYMBOL: error-stream
|
|||
} case ; inline
|
||||
|
||||
: stream-element-exemplar ( stream -- exemplar )
|
||||
stream-element-type (stream-element-exemplar) ;
|
||||
stream-element-type (stream-element-exemplar) ; inline
|
||||
|
||||
: element-exemplar ( -- exemplar )
|
||||
input-stream get stream-element-exemplar ; inline
|
||||
|
|
Loading…
Reference in New Issue