You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: huffman.go
    path of file: ./repos/unipdf/internal/jbig2/decoder/huffman
    
    the code of the file until where you have to start completion: //
// Copyright 2020 FoxyUtils ehf. All rights reserved.
//
// This is a commercial product and requires a license to operate.
// A trial license can be obtained at https://unidoc.io
//
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
//
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/

package huffman ;import (_g "errors";_af "fmt";_f "github.com/unidoc/unipdf/v3/internal/bitwise";_a "github.com/unidoc/unipdf/v3/internal/jbig2/internal";_ffg "math";_ff "strings";);type InternalNode struct{_gbf int32 ;_dfc Node ;_bcda Node ;};func (_c *EncodedTable )InitTree (codeTable []*Code )error {_gda (codeTable );
for _ ,_aa :=range codeTable {if _e :=_c ._gb .append (_aa );_e !=nil {return _e ;};};return nil ;};type Node interface{Decode (_fgag *_f .Reader )(int64 ,error );String ()string ;};func (_agd *ValueNode )Decode (r *_f .Reader )(int64 ,error ){_gc ,_ggf :=r .ReadBits (byte (_agd ._ead ));
if _ggf !=nil {return 0,_ggf ;};if _agd ._edc {_gc =-_gc ;};return int64 (_agd ._bcd )+int64 (_gc ),nil ;};func (_ecg *StandardTable )String
    
func (_ac *OutOfBandNode )Decode (r *_f .Reader )(int64 ,error ){return 0,_a .ErrOOB };var _ Tabler =&EncodedTable {};func (_aec *StandardTable )Decode (r *_f .Reader )(int64 ,error ){return _aec ._bdc .Decode (r )};var _ Node =&ValueNode {};func (_fgge *Code )String ()string {var _ggg string ;
if _fgge ._cca !=-1{_ggg =_bad (_fgge ._cca ,_fgge ._ada );}else {_ggg ="\u003f";};return _af .Sprintf ("%\u0073\u002f\u0025\u0064\u002f\u0025\u0064\u002f\u0025\u0064",_ggg ,_fgge ._ada ,_fgge ._ddac ,_fgge ._gag );};func (_bg *InternalNode )append (_bd *Code )(_ce error ){if _bd ._ada ==0{return nil ;
};_cag :=_bd ._ada -1-_bg ._gbf ;if _cag < 0{return _g .New ("\u004e\u0065\u0067\u0061\u0074\u0069\u0076\u0065\u0020\u0073\u0068\u0069\u0066\u0074\u0069n\u0067 \u0069\u0073\u0020\u006e\u006f\u0074\u0020\u0061\u006c\u006c\u006f\u0077\u0065\u0064");};_ede :=(_bd ._cca >>uint (_cag ))&0x1;
if _cag ==0{if _bd ._ddac ==-1{if _ede ==1{if _bg ._bcda !=nil {return _af .Errorf ("O\u004f\u0042\u0020\u0061\u006c\u0072e\u0061\u0064\u0079\u0020\u0073\u0065\u0074\u0020\u0066o\u0072\u0020\u0063o\u0064e\u0020\u0025\u0073",_bd );};_bg ._bcda =_egg (_bd );
}else {if _bg ._dfc !=nil {return _af .Errorf ("O\u004f\u0042\u0020\u0061\u006c\u0072e\u0061\u0064\u0079\u0020\u0073\u0065\u0074\u0020\u0066o\u0072\u0020\u0063o\u0064e\u0020\u0025\u0073",_bd );};_bg ._dfc =_egg (_bd );};}else {if _ede ==1{if _bg ._bcda !=nil {return _af .Errorf ("\u0056\u0061\u006cue\u0020\u004e\u006f\u0064\u0065\u0020\u0061\u006c\u0072e\u0061d\u0079 \u0073e\u0074\u0020\u0066\u006f\u0072\u0020\u0063\u006f\u0064\u0065\u0020\u0025\u0073",_bd );
};_bg ._bcda =_ca (_bd );}else {if _bg ._dfc !=nil {return _af .Errorf ("\u0056\u0061\u006cue\u0020\u004e\u006f\u0064\u0065\u0020\u0061\u006c\u0072e\u0061d\u0079 \u0073e\u0074\u0020\u0066\u006f\u0072\u0020\u0063\u006f\u0064\u0065\u0020\u0025\u0073",_bd );
};_bg ._dfc =_ca (_bd );};};}else {if _ede ==1{if _bg ._bcda ==nil {_bg ._bcda =_edec (_bg ._gbf +1);};if _ce =_bg ._bcda .(*InternalNode ).append (_bd );_ce !=nil {return _ce ;};}else {if _bg ._dfc ==nil {_bg ._dfc =_edec (_bg ._gbf +1);};if _ce =_bg ._dfc .(*InternalNode ).append (_bd );
_ce !=nil {return _ce ;};};};return nil ;};type Tabler interface{Decode (_dfd *_f .Reader )(int64 ,error );InitTree (_dcg []*Code )error ;String ()string ;RootNode ()*InternalNode ;};func (_agb *ValueNode )String ()string {return _af .Sprintf ("\u0025\u0064\u002f%\u0064",_agb ._ead ,_agb ._bcd );
};func _ceb (_bac ,_ecb int32 )int32 {if _bac > _ecb {return _bac ;};return _ecb ;};func (_ee *InternalNode )String ()string {_dcd :=&_ff .Builder {};_dcd .WriteString ("\u000a");_ee .pad (_dcd );_dcd .WriteString ("\u0030\u003a\u0020");_dcd .WriteString (_ee ._dfc .String ()+"\u000a");
_ee .pad (_dcd );_dcd .WriteString ("\u0031\u003a\u0020");_dcd .WriteString (_ee ._bcda .String ()+"\u000a");return _dcd .String ();};func (_fgdc *InternalNode )Decode (r *_f .Reader )(int64 ,error ){_db ,_ga :=r .ReadBit ();if _ga !=nil {return 0,_ga ;
};if _db ==0{return _fgdc ._dfc .Decode (r );};return _fgdc ._bcda .Decode (r );};var _ Node =&InternalNode {};func (_agf *StandardTable )RootNode ()*InternalNode {return _agf ._bdc };type StandardTable struct{_bdc *InternalNode };type EncodedTable struct{BasicTabler ;
_gb *InternalNode ;};func GetStandardTable (number int )(Tabler ,error ){if number <=0||number > len (_edba ){return nil ,_g .New ("\u0049n\u0064e\u0078\u0020\u006f\u0075\u0074 \u006f\u0066 \u0072\u0061\u006e\u0067\u0065");};_gbfg :=_edba [number -1];if _gbfg ==nil {var _afb error ;
_gbfg ,_afb =_gcd (_ffc [number -1]);if _afb !=nil {return nil ,_afb ;};_edba [number -1]=_gbfg ;};return _gbfg ,nil ;};func _gcd (_bae [][]int32 )(*StandardTable ,error ){var _abg []*Code ;for _fgb :=0;_fgb < len (_bae );_fgb ++{_bce :=_bae [_fgb ][0];
_edb :=_bae [_fgb ][1];_ade :=_bae [_fgb ][2];var _ddb bool ;if len (_bae [_fgb ])> 3{_ddb =true ;};_abg =append (_abg ,NewCode (_bce ,_edb ,_ade ,_ddb ));};_bdcg :=&StandardTable {_bdc :_edec (0)};if _eadb :=_bdcg .InitTree (_abg );_eadb !=nil {return nil ,_eadb ;
};return _bdcg ,nil ;};var _edba =make ([]Tabler ,len (_ffc ));func NewCode (prefixLength ,rangeLength ,rangeLow int32 ,isLowerRange bool )*Code {return &Code {_ada :prefixLength ,_ddac :rangeLength ,_gag :rangeLow ,_fgg :isLowerRange ,_cca :-1};};func (_dc *FixedSizeTable )RootNode ()*InternalNode {return _dc ._aef };