# BByteStream

## Functions

| `BByteStream`
| `BByteStream`
void | `put`
void | `get`

## Detailed Description

class `BByteStream`

  Handles transfer of certain unaligned bit lengths via unsigned char arrays.

  We determined that visual artifacts introduced in sending 8-bit normals were too noticeable, and that higher accuracy was required. At the same time, however, we wanted better compression than 16-bit. Thus, the BByteStream class was born.

  For efficiency, this class makes certain assumptions about the number of bits per pixel: 1) that samples are at least 1 byte (see logic controlling byteplace incrementing); 2) that samples never span 3 bytes in the character array (ruling out lengths of 11, 13, 14, 15, and 17+. Additionally, the bit shifting operations here are needless overhead for any length divisible by 8, meaning that this class is not the best way to do it. These assumptions and observations restrict us (at least for the moment) to 9, 10, and 12 as allowable sample lengths.

  This class is a state machine that is intended to match the semantics of a FILE* (with the obvious exception that it goes into a uchar* rather than to a real file. With that in mind, it does not support random access through the data. Only a linear walk from front to back is allowed.

  Public Functions

  inline `BByteStream`(int size, unsigned char *cptr, int bpv)
  inline `BByteStream`()
  inline void `put`(unsigned short value)
  inline void `get`(unsigned short &value)

    read a sample

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Visualize 3DF in your own language, or choose a sample question below to start a conversation:

What is HOOPS Visualize 3DF?
What are the latest release notes for HOOPS Visualize 3DF?
How do I start evaluating HOOPS Visualize 3DF?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...