Skip to content

Mixed writing behaviour #16

@aserdobintsev

Description

@aserdobintsev

Hi Devran, could you help me to understand, is it intended writing behaviour that divides writing with bits and bytes?

For example:

var bin = Binary(bytes: [])
bin.writeBit(bit: 1)
bin.writeByte(8)

I would expect the binary is 0b1000_0100_0000_0000 - padded with zeros to the end of the byte.
The Actual result is 0b1000_0000_0000_1000 - written byte adde as next but bit cursor still points to the position '1'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions