![]() | Smalltalk/X WebserverDocumentation of class 'BitStream': |
Class: BitStreamInheritance:Object | +--Stream | +--BitStream
Description:a quick and dirty hack (unfinished and not optimized) [usage:] |bs| bs := BitStream on:(#[2r10000000 2r11000000 2r11100000 2r11110000 2r00001000 2r00000100 2r00000010 2r00000001] readStream). ' 10000000 11000000 11100000 11 11000000 00100000 00010000 00001000 000001 '. self assert: ( t := bs nextBits:24 MSB:true ) == 2r100000001100000011100000. self assert: ( t := bs nextBits:2 MSB:true ) == 2r11. self assert: ( t := bs nextBits:24 MSB:true ) == 2r110000000010000000010000. self assert: ( t := bs nextBits:8 MSB:true ) == 2r00001000. self assert: ( t := bs nextBits:6 MSB:true ) == 2r000001. bs reset. self assert: ( t := bs nextBits:24 MSB:false ) == 2r000001110000001100000001. self assert: ( t := bs nextBits:2 MSB:false ) == 2r11. self assert: ( t := bs nextBits:24 MSB:false ) == 2r000010000000010000000011. self assert: ( t := bs nextBits:8 MSB:false ) == 2r00010000. self assert: ( t := bs nextBits:6 MSB:false ) == 2r100000. Class protocol:instance creationInstance protocol:accessing positioning queries
|
|
ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 08 Sep 2024 02:10:35 GMT |