boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - question on stream write
相关主题
help about bitstream writer
怎麼得到字符串中的raw bytes?
关于char和int的问题
convert array to blob
how to read from a non-return socket stream?
Object stream & serilization有啥用处?
问个很简单的问题?
怎样吧byte[]变成java.security.Key?
How to parse the bytes[]
问个xml的问题
相关话题的讨论汇总
话题: stream话题: write话题: bits话题: byte话题: question
进入Java版参与讨论
1 (共1页)
z********i
发帖数: 60
1
I need to write some bits to a stream, but not 1 byte, such as write a value
of 3 to a stream only occupy 2 bits. Is there any comments on it?
Thanks
g*****g
发帖数: 34805
2
You need to specify your request more clearly. Encoding is always dependent on
your specific application.
For example, if all are 0-3, you can use 2 bit coding and pack 4 values into
one byte.

【在 z********i 的大作中提到】
: I need to write some bits to a stream, but not 1 byte, such as write a value
: of 3 to a stream only occupy 2 bits. Is there any comments on it?
: Thanks

1 (共1页)
进入Java版参与讨论
相关主题
问个xml的问题
Java basic concept(2)
Re: [转载] rephase the question
java 随机数 nextInt(int n)的问题
Can i install 32bit JVM on windows 7 64bit?
火车旅行家在中文WINDOWS下无法运行的大问题已被解决
Re: 问题:用Java/HTTP协议传送jpg图像文件
Core Java2 Notes (6)
[转载] Actually let me rephrase my question
help! BufferedImage
相关话题的讨论汇总
话题: stream话题: write话题: bits话题: byte话题: question