MCPcopy Create free account
hub / github.com/ElementsProject/elements / read1Bit

Function read1Bit

src/simplicity/bitstream.h:55–57  ·  view source on GitHub ↗

Returns one bit from 'stream', 0 or 1. * Returns 'SIMPLICITY_ERR_BITSTREAM_EOF' if no bits are available. * * Precondition: NULL != stream */

Source from the content-addressed store, hash-verified

53 * Precondition: NULL != stream
54 */
55static inline int32_t read1Bit(bitstream* stream) {
56 return simplicity_readNBits(1, stream);
57}
58
59/* Decode an encoded number between 1 and 2^31 - 1 inclusive.
60 * When successful returns the decoded result.

Callers 8

decodeUpto1BitFunction · 0.85
decodeUpto3BitsFunction · 0.85
decodeUpto15BitsFunction · 0.85
decodeNodeFunction · 0.85
decodePrimitiveFunction · 0.85
decodePrimitiveFunction · 0.85

Calls 1

simplicity_readNBitsFunction · 0.85

Tested by

no test coverage detected