Giter Club home page Giter Club logo

degolomb's Introduction

De Golomb by Chanel

Exponential Golomb

Decode a exponential Golomb coded byte Wikipedia

b := byte(23)
fieldWidths := []int{4, 2, 2}
vals := Degolomb(b, fieldWidths)
// vals == []int{1, 1, 3}

Also includes BitArray function

bits := bitArray(b)
// bits == []int{0,0,0,1,0,1,1,1}

Aside

Exp-Golomb coded fields are denotes as N+1 padded with the count of 1-bits as 0's. Eg: 6-base10 = 00111. This program returns 7, which is the encoded value, not 6, which is described as the value of N. This small library was conceived to decode H.264 packets where the goal is not the original value but the encoded value. Thus, the library operates as a software engineer or computer scientist would imagine it to, not as a mathematician would. May Knuth save you if you're both.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.