Talk:Bitwise IO: Difference between revisions

From Rosetta Code
Content added Content deleted
(why this)
 
(Big endian?)
Line 1: Line 1:
==Real intention==
==Real intention==
The real intention of this task and code was to have a bunch of functions to test the LZW compressor / decompressor on a binary real output (instead of ''array'' or similar output); this way compression ratio statistics for the LZW of the task [[LZW compression]] can be done. --[[User:ShinTakezou|ShinTakezou]] 16:57, 19 December 2008 (UTC)
The real intention of this task and code was to have a bunch of functions to test the LZW compressor / decompressor on a binary real output (instead of ''array'' or similar output); this way compression ratio statistics for the LZW of the task [[LZW compression]] can be done. --[[User:ShinTakezou|ShinTakezou]] 16:57, 19 December 2008 (UTC)

: Hmm, strictly speaking it is not bit-oriented. It is rather a bit-stream interface to a byte-oriented I/O. Exactly because it is not bit I/O (as for instance a serial I/O is) you have an endianness issue here. So in your task you should specify whether it is big or little endian encoding of bits into bytes. Your code looks like big endian. Was it your intention? --[[User:Dmitry-kazakov|Dmitry-kazakov]] 18:28, 19 December 2008 (UTC)

Revision as of 18:28, 19 December 2008

Real intention

The real intention of this task and code was to have a bunch of functions to test the LZW compressor / decompressor on a binary real output (instead of array or similar output); this way compression ratio statistics for the LZW of the task LZW compression can be done. --ShinTakezou 16:57, 19 December 2008 (UTC)

Hmm, strictly speaking it is not bit-oriented. It is rather a bit-stream interface to a byte-oriented I/O. Exactly because it is not bit I/O (as for instance a serial I/O is) you have an endianness issue here. So in your task you should specify whether it is big or little endian encoding of bits into bytes. Your code looks like big endian. Was it your intention? --Dmitry-kazakov 18:28, 19 December 2008 (UTC)