MCPcopy Create free account
hub / github.com/facebook/time / NewBitWriter

Function NewBitWriter

rtcm/bits.go:73–75  ·  view source on GitHub ↗

NewBitWriter creates a BitWriter with the given initial capacity in bytes.

(capacity int)

Source from the content-addressed store, hash-verified

71
72// NewBitWriter creates a BitWriter with the given initial capacity in bytes.
73func NewBitWriter(capacity int) *BitWriter {
74 return &BitWriter{data: make([]byte, capacity)}
75}
76
77// WriteBits writes n bits (1-32) from the least significant bits of val.
78func (w *BitWriter) WriteBits(val uint32, n int) {

Callers 8

TestBitReaderSkipFunction · 0.85
TestBitWriterBytePaddingFunction · 0.85
TestBitWriterEmptyFunction · 0.85
EncodeMSM7Function · 0.85
AddSFRBXMethod · 0.85
encode1019Function · 0.85

Calls

no outgoing calls

Tested by 5

TestBitReaderSkipFunction · 0.68
TestBitWriterBytePaddingFunction · 0.68
TestBitWriterEmptyFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…