Skip to content
/ bits Public
forked from nareix/bits

Golang bitstream reader/writer

Notifications You must be signed in to change notification settings

tangrames/bits

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang bitstream reader/writer

reader, _ := os.Open("input")
r := &bits.Reader{R: reader}
u32, err = r.ReadBits(4)
u64, err = r.ReadBits64(4)
p := make([]byte, 4)
n, err = r.Read(p)
  
writer, _ := os.Create("output")
w := &bits.Writer{W: writer}
err = w.WriteBits(0xf, 4)
err = w.WriteBits64(0xf, 4)
n, err = w.Write([]byte{0x34,0x56})
err = w.FlushBits()

About

Golang bitstream reader/writer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%