2025-01-02 13:04:03 +00:00

121 lines
34 KiB
Go

//
// 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 mscfb ;import (_a "bytes";_b "encoding/binary";_af "fmt";_cd "github.com/richardlehane/msoleps/types";_cb "github.com/unidoc/unioffice/internal/mscfb/rw";_c "io";_dg "os";_e "strconv";_g "time";_db "unicode";_aa "unicode/utf16";);func (_gfc *File )WriteAt (p []byte ,off int64 )(_ffdf int ,_bfa error ){_ceb ,_gfb ,_efa :=_gfc ._agfg ,_gfc ._aff ,_gfc ._def ;
_ ,_bfa =_gfc .Seek (off ,0);if _bfa ==nil {_ffdf ,_bfa =_gfc .Write (p );};_gfc ._agfg ,_gfc ._aff ,_gfc ._def =_ceb ,_gfb ,_efa ;return _ffdf ,_bfa ;};func (_gab *File )FileInfo ()_dg .FileInfo {return fileInfo {_gab }};type File struct{Name string ;
Initial uint16 ;Path []string ;Size int64 ;_agfg int64 ;_def uint32 ;_aff int64 ;*directoryEntryFields ;_dga *Reader ;};const (_f uint8 =0x0;_ec uint8 =0x1;_fa uint8 =0x2;_gg uint8 =0x5;);const (_ed uint8 =0x0;_dd uint8 =0x1;);const (_bfbg uint64 =0xE11AB1A1E011CFD0;
_caag uint32 =64;_abb int64 =4096;_aagf uint32 =128;);func (_ecd *Reader )setDifats ()error {_ecd ._fgb ._eec =_ecd ._fgb ._afc [:];if _ecd ._fgb ._eac ==0{return nil ;};_gfea :=(_ecd ._egbf /4)-1;_aege :=make ([]uint32 ,109,_ecd ._fgb ._eac *_gfea +109);
copy (_aege ,_ecd ._fgb ._eec );_ecd ._fgb ._eec =_aege ;_ege :=_ecd ._fgb ._dad ;for _bcd :=0;_bcd < int (_ecd ._fgb ._eac );_bcd ++{_cgd ,_cfca :=_ecd .readAt (_fbe (_ecd ._egbf ,_ege ),int (_ecd ._egbf ));if _cfca !=nil {return Error {ErrFormat ,"e\u0072r\u006f\u0072\u0020\u0073\u0065\u0074\u0074\u0069n\u0067\u0020\u0044\u0049FA\u0054\u0028"+_cfca .Error ()+"\u0029",int64 (_ege )};
};for _gdba :=0;_gdba < int (_gfea );_gdba ++{_ecd ._fgb ._eec =append (_ecd ._fgb ._eec ,_b .LittleEndian .Uint32 (_cgd [_gdba *4:_gdba *4+4]));};_ege =_b .LittleEndian .Uint32 (_cgd [len (_cgd )-4:]);};return nil ;};func _bee (_bgde *directoryEntryFields )(*_a .Buffer ,error ){_gde :=_a .NewBuffer ([]byte {});
for _ ,_ee :=range _bgde ._ecg {if _gaba :=_b .Write (_gde ,_b .LittleEndian ,&_ee );_gaba !=nil {return nil ,_gaba ;};};if _ebd :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._bb );_ebd !=nil {return nil ,_ebd ;};if _fb :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._efd );
_fb !=nil {return nil ,_fb ;};if _gge :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._dgd );_gge !=nil {return nil ,_gge ;};if _ccd :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._ba );_ccd !=nil {return nil ,_ccd ;};if _ccg :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._dgda );
_ccg !=nil {return nil ,_ccg ;};if _ca :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._eb );_ca !=nil {return nil ,_ca ;};if _ada :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._de .DataA );_ada !=nil {return nil ,_ada ;};if _bdda :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._de .DataB );
_bdda !=nil {return nil ,_bdda ;};if _dfd :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._de .DataC );_dfd !=nil {return nil ,_dfd ;};if _ ,_bcad :=_gde .Write (_bgde ._de .DataD [:]);_bcad !=nil {return nil ,_bcad ;};if _ ,_gggc :=_gde .Write (_bgde ._cbd [:]);
_gggc !=nil {return nil ,_gggc ;};if _faa :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._edf .Low );_faa !=nil {return nil ,_faa ;};if _abeb :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._edf .High );_abeb !=nil {return nil ,_abeb ;};if _ffed :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._ac .Low );
_ffed !=nil {return nil ,_ffed ;};if _abda :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._ac .High );_abda !=nil {return nil ,_abda ;};if _ceff :=_b .Write (_gde ,_b .LittleEndian ,&_bgde ._dbe );_ceff !=nil {return nil ,_ceff ;};if _ ,_fac :=_gde .Write (_bgde ._faf [:]);
_fac !=nil {return nil ,_fac ;};return _gde ,nil ;};func (_afb *File )ensureWriterAt ()error {if _afb ._dga ._fcce ==nil {_ccc ,_gggg :=_afb ._dga ._abfa .(_c .WriterAt );if !_gggg {return Error {ErrWrite ,"\u006d\u0073\u0063\u0066\u0062\u002e\u004ee\u0077\u0020\u006d\u0075\u0073\u0074\u0020\u0062\u0065\u0020\u0067\u0069\u0076\u0065n\u0020R\u0065\u0061\u0064\u0065\u0072\u0041t\u0020\u0063\u006f\u006e\u0076\u0065\u0072t\u0069\u0062\u006c\u0065\u0020\u0074\u006f\u0020\u0061\u0020\u0069\u006f\u002e\u0057\u0072\u0069\u0074\u0065\u0072\u0041\u0074\u0020\u0069n\u0020\u006f\u0072\u0064\u0065\u0072\u0020\u0074\u006f\u0020\u0077\u0072\u0069t\u0065",0};
};_afb ._dga ._fcce =_ccc ;};return nil ;};func _bf (_bag []byte )*directoryEntryFields {_bg :=&directoryEntryFields {};for _dge :=range _bg ._ecg {_bg ._ecg [_dge ]=_b .LittleEndian .Uint16 (_bag [_dge *2:_dge *2+2]);};_bg ._bb =_b .LittleEndian .Uint16 (_bag [64:66]);
_bg ._efd =uint8 (_bag [66]);_bg ._dgd =uint8 (_bag [67]);_bg ._ba =_b .LittleEndian .Uint32 (_bag [68:72]);_bg ._dgda =_b .LittleEndian .Uint32 (_bag [72:76]);_bg ._eb =_b .LittleEndian .Uint32 (_bag [76:80]);_bg ._de =_cd .MustGuid (_bag [80:96]);copy (_bg ._cbd [:],_bag [96:100]);
_bg ._edf =_cd .MustFileTime (_bag [100:108]);_bg ._ac =_cd .MustFileTime (_bag [108:116]);_bg ._dbe =_b .LittleEndian .Uint32 (_bag [116:120]);copy (_bg ._faf [:],_bag [120:128]);return _bg ;};type Reader struct{_ggc bool ;_egbf uint32 ;_bef []byte ;_fgb *header ;
File []*File ;_dbae []*File ;_abfe int ;_abfa _c .ReaderAt ;_fcce _c .WriterAt ;};func (_bc fileInfo )Sys ()interface{}{return nil };type directoryEntryFields struct{_ecg [32]uint16 ;_bb uint16 ;_efd uint8 ;_dgd uint8 ;_ba uint32 ;_dgda uint32 ;_eb uint32 ;
_de _cd .Guid ;_cbd [4]byte ;_edf _cd .FileTime ;_ac _cd .FileTime ;_dbe uint32 ;_faf [8]byte ;};func (_cbfa *Reader )GetHeader ()*header {return _cbfa ._fgb };func (_gfca *File )seek (_egd int64 )error {var _cef bool ;var _bgd int64 ;if _gfca .Size < _abb {_cef =true ;
_bgd =64;}else {_bgd =int64 (_gfca ._dga ._egbf );};var _dggd int64 ;var _eca error ;if _gfca ._aff > 0{if _bgd -_gfca ._aff <=_egd {_gfca ._def ,_eca =_gfca ._dga .findNext (_gfca ._def ,_cef );if _eca !=nil {return _eca ;};_dggd +=_bgd -_gfca ._aff ;
_gfca ._aff =0;if _dggd ==_egd {return nil ;};}else {_gfca ._aff +=_egd ;return nil ;};if _gfca ._def ==_cad {return Error {ErrRead ,"\u0075\u006ee\u0078\u0070\u0065\u0063\u0074\u0065\u0064\u0020\u0065\u0061\u0072\u006c\u0079\u0020\u0065\u006e\u0064\u0020\u006f\u0066\u0020\u0063ha\u0069\u006e",int64 (_gfca ._def )};
};};for {if _egd -_dggd < _bgd {_gfca ._aff =_egd -_dggd ;return nil ;}else {_dggd +=_bgd ;_gfca ._def ,_eca =_gfca ._dga .findNext (_gfca ._def ,_cef );if _eca !=nil {return _eca ;};if _dggd ==_egd {return nil ;};};};};func (_gdb *Reader )exportDirEntries (_aab *_cb .Writer )error {if int64 (_aab .Len ())!=_fbe (_gdb ._egbf ,_gdb ._fgb ._cefd ){return Error {ErrWrite ,_af .Sprintf ("I\u006e\u0063\u006f\u0072\u0072\u0065c\u0074\u0020\u0077\u0072\u0069\u0074\u0065\u0072\u0020l\u0065\u006e\u0067t\u0068:\u0020\u0025\u0076",_aab .Len ()),0};
};for _ ,_eee :=range _gdb ._dbae {_gdg ,_gcge :=_bee (_eee .directoryEntryFields );if _gcge !=nil {return _gcge ;};if _ ,_ede :=_c .Copy (_aab ,_gdg );_ede !=nil {return _ede ;};};return nil ;};type fileInfo struct{*File };func (_gef *Reader )setHeader ()error {_adf ,_aded :=_gef .readAt (0,_cbfb );
if _aded !=nil {return _aded ;};_gef ._fgb =&header {headerFields :_cff (_adf )};if _gef ._fgb ._bdf !=_bfbg {return Error {ErrFormat ,"\u0062\u0061\u0064\u0020\u0073\u0069\u0067\u006e\u0061\u0074\u0075\u0072\u0065",int64 (_gef ._fgb ._bdf )};};if _gef ._fgb ._bde ==0x0009||_gef ._fgb ._bde ==0x000c{_gef ._egbf =uint32 (1<<_gef ._fgb ._bde );
}else {return Error {ErrFormat ,"\u0069\u006c\u006c\u0065ga\u006c\u0020\u0073\u0065\u0063\u0074\u006f\u0072\u0020\u0073\u0069\u007a\u0065",int64 (_gef ._fgb ._bde )};};if _gef ._fgb ._eac > 0{_facd :=(_gef ._egbf /4)-1;if int (_gef ._fgb ._eac *_facd +109)< 0{return Error {ErrFormat ,"\u0044I\u0046A\u0054\u0020\u0069\u006e\u0074 \u006f\u0076e\u0072\u0066\u006c\u006f\u0077",int64 (_gef ._fgb ._eac )};
};if _gef ._fgb ._eac *_facd +109> _gef ._fgb ._fga +_facd {return Error {ErrFormat ,"\u006e\u0075\u006d\u0020\u0044\u0049\u0046\u0041\u0054\u0073 \u0065\u0078\u0063\u0065\u0065\u0064\u0073 \u0046\u0041\u0054\u0020\u0073\u0065\u0063\u0074\u006f\u0072\u0073",int64 (_gef ._fgb ._eac )};
};};if _gef ._fgb ._cae > 0{if int (_gef ._egbf /4*_gef ._fgb ._cae )< 0{return Error {ErrFormat ,"m\u0069\u006e\u0069\u0020FA\u0054 \u0069\u006e\u0074\u0020\u006fv\u0065\u0072\u0066\u006c\u006f\u0077",int64 (_gef ._fgb ._cae )};};if _gef ._fgb ._cae > _gef ._fgb ._fga *(_gef ._egbf /_caag ){return Error {ErrFormat ,"\u006e\u0075\u006d\u0020\u006d\u0069n\u0069\u0020\u0046\u0041\u0054\u0073\u0020\u0065\u0078\u0063\u0065\u0065\u0064s\u0020\u0046\u0041\u0054\u0020\u0073\u0065c\u0074\u006f\u0072\u0073",int64 (_gef ._fgb ._fga )};
};};return nil ;};func (_gcg *File )SetEntryContent (b []byte )error {if _badd :=_gcg .ensureWriterAt ();_badd !=nil {return _badd ;};_gcg .reset ();if _ade :=_gcg .changeSize (int64 (len (b )));_ade !=nil {return _ade ;};_ ,_dbf :=_gcg .Write (b );return _dbf ;
};func (_dgad *File )findLast (_fff bool )(uint32 ,error ){_ddg :=_dgad ._dbe ;for {_daa ,_abg :=_dgad ._dga .findNext (_ddg ,_fff );if _abg !=nil {return 0,Error {ErrRead ,"\u0062\u0061\u0064\u0020\u0072\u0065\u0061\u0064\u0020\u0066i\u006e\u0064\u0069\u006e\u0067\u0020\u006ee\u0078\u0074\u0020\u0073\u0065\u0063\u0074\u006f\u0072\u0020\u0028"+_abg .Error ()+"\u0029",0};
};if _daa ==_cad {break ;};_ddg =_daa ;};return _ddg ,nil ;};func (_gagc *File )Seek (offset int64 ,whence int )(int64 ,error ){var _abe int64 ;switch whence {default:return 0,Error {ErrSeek ,"\u0069\u006e\u0076\u0061\u006c\u0069\u0064\u0020\u0077h\u0065\u006e\u0063\u0065",int64 (whence )};
case 0:_abe =offset ;case 1:_abe =_gagc ._agfg +offset ;case 2:_abe =_gagc .Size -offset ;};switch {case _abe < 0:return _gagc ._agfg ,Error {ErrSeek ,"\u0063\u0061\u006e'\u0074\u0020\u0073\u0065e\u006b\u0020\u0062\u0065\u0066\u006f\u0072e\u0020\u0073\u0074\u0061\u0072\u0074\u0020\u006f\u0066\u0020\u0046\u0069\u006c\u0065",_abe };
case _abe >=_gagc .Size :return _gagc ._agfg ,Error {ErrSeek ,"c\u0061\u006e\u0027\u0074\u0020\u0073e\u0065\u006b\u0020\u0070\u0061\u0073\u0074\u0020\u0046i\u006c\u0065\u0020l\u0065n\u0067\u0074\u0068",_abe };case _abe ==_gagc ._agfg :return _abe ,nil ;
case _abe > _gagc ._agfg :_gce :=_gagc ._agfg ;_gagc ._agfg =_abe ;return _gagc ._agfg ,_gagc .seek (_abe -_gce );};if _gagc ._aff >=_gagc ._agfg -_abe {_gagc ._aff =_gagc ._aff -(_gagc ._agfg -_abe );_gagc ._agfg =_abe ;return _gagc ._agfg ,nil ;};_gagc ._aff =0;
_gagc ._def =_gagc ._dbe ;_gagc ._agfg =_abe ;return _gagc ._agfg ,_gagc .seek (_abe );};func (_gf *Reader )traverse ()error {_gf .File =make ([]*File ,0,len (_gf ._dbae ));var (_ggg func (int ,[]string );_ff error ;_dda int ;);_ggg =func (_dfa int ,_ea []string ){_dda ++;
if _dda > len (_gf ._dbae ){_ff =Error {ErrTraverse ,"\u0074\u0072\u0061\u0076\u0065\u0072\u0073\u0061\u006c\u0020\u0063o\u0075\u006e\u0074\u0065\u0072\u0020\u006f\u0076\u0065\u0072f\u006c\u006f\u0077",int64 (_dfa )};return ;};if _dfa < 0||_dfa >=len (_gf ._dbae ){_ff =Error {ErrTraverse ,"\u0069\u006c\u006ceg\u0061\u006c\u0020\u0074\u0072\u0061\u0076\u0065\u0072\u0073\u0061\u006c\u0020\u0069\u006e\u0064\u0065\u0078",int64 (_dfa )};
return ;};_agf :=_gf ._dbae [_dfa ];if _agf ._ba !=_gga {_ggg (int (_agf ._ba ),_ea );};_gf .File =append (_gf .File ,_agf );_agf .Path =_ea ;if _agf ._eb !=_gga {if _dfa > 0{_ggg (int (_agf ._eb ),append (_ea ,_agf .Name ));}else {_ggg (int (_agf ._eb ),_ea );
};};if _agf ._dgda !=_gga {_ggg (int (_agf ._dgda ),_ea );};return ;};_ggg (0,[]string {});return _ff ;};func (_dfb *File )reset (){_dfb ._agfg =0;_dfb ._aff =0;_dfb ._def =_dfb ._dbe };func _fbe (_dcd ,_caa uint32 )int64 {return int64 ((_caa +1)*_dcd )};
func (_cfe *File )Read (b []byte )(int ,error ){if _cfe .Size < 1||_cfe ._agfg >=_cfe .Size {return 0,_c .EOF ;};_gfed :=len (b );if int64 (_gfed )> _cfe .Size -_cfe ._agfg {_gfed =int (_cfe .Size -_cfe ._agfg );};_be ,_fdf :=_cfe .stream (_gfed );if _fdf !=nil {return 0,_fdf ;
};var _dabg ,_bgc int ;for _ ,_cdf :=range _be {_ffd :=_dabg +int (_cdf [1]);if _ffd < _dabg ||_ffd > _gfed {return 0,Error {ErrRead ,"\u0062a\u0064 \u0072\u0065\u0061\u0064\u0020\u006c\u0065\u006e\u0067\u0074\u0068",int64 (_ffd )};};_daf ,_cgbd :=_cfe ._dga ._abfa .ReadAt (b [_dabg :_ffd ],_cdf [0]);
_bgc =_bgc +_daf ;if _cgbd !=nil {_cfe ._agfg +=int64 (_bgc );return _bgc ,Error {ErrRead ,"\u0075n\u0064\u0065\u0072\u006c\u0079\u0069\u006e\u0067\u0020\u0072\u0065a\u0064\u0065\u0072\u0020\u0066\u0061\u0069\u006c\u0020\u0028"+_cgbd .Error ()+"\u0029",int64 (_dabg )};
};_dabg =_ffd ;};_cfe ._agfg +=int64 (_bgc );if _bgc !=_gfed {_fdf =Error {ErrRead ,"\u0062\u0079\u0074e\u0073\u0020\u0072\u0065\u0061\u0064\u0020\u0064\u006f\u0020\u006e\u006f\u0074\u0020\u006d\u0061\u0074\u0063\u0068\u0020\u0065\u0078\u0070\u0065\u0063\u0074\u0065\u0064\u0020r\u0065\u0061\u0064\u0020\u0073\u0069\u007a\u0065",int64 (_bgc )};
}else if _bgc < len (b ){_fdf =_c .EOF ;};return _bgc ,_fdf ;};func (_cefc *Reader )findNextFreeSector (_aaf bool )(uint32 ,error ){_fcd :=_cefc .findFatLocsOffset (_aaf );_acda :=uint32 (0);_aacf :=_cefc ._egbf /4;for {_fgc ,_beg :=_cefc .readAt (_fcd ,4);
if _beg !=nil {return 0,Error {ErrRead ,"\u0062\u0061\u0064\u0020\u0072\u0065\u0061\u0064\u0020\u0066i\u006e\u0064\u0069\u006e\u0067\u0020\u006ee\u0078\u0074\u0020\u0073\u0065\u0063\u0074\u006f\u0072\u0020\u0028"+_beg .Error ()+"\u0029",_fcd };};_efb :=_b .LittleEndian .Uint32 (_fgc );
if _efb ==_dba {break ;};if _acda >=_aacf {return 0,Error {ErrRead ,"\u0065\u006e\u0064\u0020of\u0020\u006d\u0069\u006e\u0069\u0046\u0061\u0074\u0020\u0072\u0065\u0061\u0063\u0068e\u0064",_fcd };};_acda ++;_fcd +=4;};return _acda ,nil ;};func (_cbbc *Reader )findFatLocsOffset (_faad bool )int64 {var _aef uint32 ;
if _faad {_aef =_cbbc ._fgb ._bdad [0];}else {_aef =_cbbc ._fgb ._eec [0];};return _fbe (_cbbc ._egbf ,_aef );};func (_fd fileInfo )Name ()string {return _fd .File .Name };func (_daff *Reader )Read (b []byte )(_agd int ,_gfbf error ){if _daff ._abfe >=len (_daff .File ){return 0,_c .EOF ;
};return _daff .File [_daff ._abfe ].Read (b );};func (_aceb *Reader )getOffset (_ecda uint32 ,_fce bool )(int64 ,error ){if _fce {_cbba :=_aceb ._egbf /64;_gced :=int (_ecda /_cbba );if _gced >=len (_aceb ._fgb ._dfbg ){return 0,Error {ErrRead ,"\u006di\u006e\u0069s\u0065\u0063\u0074o\u0072\u0020\u006e\u0075\u006d\u0062\u0065r\u0020\u0069\u0073\u0020\u006f\u0075t\u0073\u0069\u0064\u0065\u0020\u006d\u0069\u006e\u0069\u0073\u0065c\u0074\u006f\u0072\u0020\u0072\u0061\u006e\u0067\u0065",int64 (_gced )};
};_dbg :=_ecda %_cbba ;return int64 ((_aceb ._fgb ._dfbg [_gced ]+1)*_aceb ._egbf +_dbg *64),nil ;};return _fbe (_aceb ._egbf ,_ecda ),nil ;};func (_ccab *File )stream (_baa int )([][2]int64 ,error ){var _bbe bool ;var _ebc int ;var _eae int64 ;if _ccab .Size < _abb {_bbe =true ;
_ebc =_baa /int (_caag )+2;_eae =int64 (_caag );}else {_ebc =_baa /int (_ccab ._dga ._egbf )+2;_eae =int64 (_ccab ._dga ._egbf );};_cbg :=make ([][2]int64 ,0,_ebc );var _edb ,_dggf int ;if _ccab ._aff > 0{_cfc ,_edfd :=_ccab ._dga .getOffset (_ccab ._def ,_bbe );
if _edfd !=nil {return nil ,_edfd ;};if _eae -_ccab ._aff >=int64 (_baa ){_cbg =append (_cbg ,[2]int64 {_cfc +_ccab ._aff ,int64 (_baa )});}else {_cbg =append (_cbg ,[2]int64 {_cfc +_ccab ._aff ,_eae -_ccab ._aff });};if _eae -_ccab ._aff <=int64 (_baa ){_ccab ._def ,_edfd =_ccab ._dga .findNext (_ccab ._def ,_bbe );
if _edfd !=nil {return nil ,_edfd ;};_dggf +=int (_eae -_ccab ._aff );_ccab ._aff =0;}else {_ccab ._aff +=int64 (_baa );};if _cbg [0][1]==int64 (_baa ){return _cbg ,nil ;};if _ccab ._def ==_cad {return nil ,Error {ErrRead ,"\u0075\u006ee\u0078\u0070\u0065\u0063\u0074\u0065\u0064\u0020\u0065\u0061\u0072\u006c\u0079\u0020\u0065\u006e\u0064\u0020\u006f\u0066\u0020\u0063ha\u0069\u006e",int64 (_ccab ._def )};
};_edb ++;};for {if _edb >=cap (_cbg ){return nil ,Error {ErrRead ,"\u0069\u006e\u0064\u0065x\u0020\u006f\u0076\u0065\u0072\u0072\u0075\u006e\u0073\u0020s\u0065c\u0074\u006f\u0072\u0020\u006c\u0065\u006eg\u0074\u0068",int64 (_edb )};};_abea ,_gd :=_ccab ._dga .getOffset (_ccab ._def ,_bbe );
if _gd !=nil {return nil ,_gd ;};if _baa -_dggf < int (_eae ){_cbg =append (_cbg ,[2]int64 {_abea ,int64 (_baa -_dggf )});_ccab ._aff =int64 (_baa -_dggf );return _gca (_cbg ),nil ;}else {_cbg =append (_cbg ,[2]int64 {_abea ,_eae });_dggf +=int (_eae );
_ccab ._def ,_gd =_ccab ._dga .findNext (_ccab ._def ,_bbe );if _gd !=nil {return nil ,_gd ;};if _dggf ==_baa {return _gca (_cbg ),nil ;};};_edb ++;};};const (_aaa uint32 =0xFFFFFFFA;_dfdc uint32 =0xFFFFFFFC;_gdd uint32 =0xFFFFFFFD;_cad uint32 =0xFFFFFFFE;
_dba uint32 =0xFFFFFFFF;_fe byte =0xFF;_bfe uint32 =0xFFFFFFFA;_gga uint32 =0xFFFFFFFF;);func (_bad fileInfo )IsDir ()bool {return _bad .mode ().IsDir ()};func New (ra _c .ReaderAt )(*Reader ,error ){_dabc :=&Reader {_abfa :ra };if _ ,_bbeb :=ra .(slicer );
_bbeb {_dabc ._ggc =true ;}else {_dabc ._bef =make ([]byte ,_cbfb );};if _fcb :=_dabc .setHeader ();_fcb !=nil {return nil ,_fcb ;};if !_dabc ._ggc &&int (_dabc ._egbf )> len (_dabc ._bef ){_dabc ._bef =make ([]byte ,_dabc ._egbf );};if _abdd :=_dabc .setDifats ();
_abdd !=nil {return nil ,_abdd ;};if _bbebc :=_dabc .setDirEntries ();_bbebc !=nil {return nil ,_bbebc ;};if _bge :=_dabc .setMiniStream ();_bge !=nil {return nil ,_bge ;};if _dbb :=_dabc .traverse ();_dbb !=nil {return nil ,_dbb ;};return _dabc ,nil ;
};type header struct{*headerFields ;_eec []uint32 ;_bdad []uint32 ;_dfbg []uint32 ;};func (_bgb *Reader )GetEntry (entryName string )(*File ,error ){for _fgf ,_dcb :=_bgb .Next ();_dcb ==nil ;_fgf ,_dcb =_bgb .Next (){if _fgf .Name ==entryName {return _fgf ,nil ;
};};return nil ,Error {ErrTraverse ,"\u004e\u006f\u0020\u0065\u006e\u0074\u0072\u0079\u0020\u0066o\u0075\u006e\u0064\u0020\u0066\u006f\u0072 \u0067\u0069\u0076\u0065\u006e\u0020\u006e\u0061\u006d\u0065\u002e",0};};func (_acgc *Reader )exportFAT (_daffa *_cb .Writer ,_ffdb []uint32 )error {if _acgc ._fgb ._fga ==0{return nil ;
};_ddb :=_a .NewBuffer ([]byte {});if _gfee :=_b .Write (_ddb ,_b .LittleEndian ,_gdd );_gfee !=nil {return _gfee ;};for _gdf :=0;_gdf < len (_ffdb )-1;_gdf ++{for _gbg :=_ffdb [_gdf ];_gbg < _ffdb [_gdf +1]-1;_gbg ++{if _cede :=_b .Write (_ddb ,_b .LittleEndian ,_gbg );
_cede !=nil {return _cede ;};};if _adab :=_b .Write (_ddb ,_b .LittleEndian ,_cad );_adab !=nil {return _adab ;};};_dfg :=512;for _ ,_bcee :=range _ddb .Bytes (){if _fgfa :=_daffa .WriteByteAt (_bcee ,_dfg );_fgfa !=nil {return _fgfa ;};_dfg ++;};return nil ;
};func _cff (_aac []byte )*headerFields {_aca :=&headerFields {};_aca ._bdf =_b .LittleEndian .Uint64 (_aac [:8]);_aca ._bda =_b .LittleEndian .Uint16 (_aac [24:26]);_aca ._eeb =_b .LittleEndian .Uint16 (_aac [26:28]);_aca ._bde =_b .LittleEndian .Uint16 (_aac [30:32]);
_aca ._bgca =_b .LittleEndian .Uint32 (_aac [40:44]);_aca ._fga =_b .LittleEndian .Uint32 (_aac [44:48]);_aca ._cefd =_b .LittleEndian .Uint32 (_aac [48:52]);_aca ._efc =_b .LittleEndian .Uint32 (_aac [60:64]);_aca ._cae =_b .LittleEndian .Uint32 (_aac [64:68]);
_aca ._dad =_b .LittleEndian .Uint32 (_aac [68:72]);_aca ._eac =_b .LittleEndian .Uint32 (_aac [72:76]);var _gda int ;for _gbf :=76;_gbf < 512;_gbf =_gbf +4{_aca ._afc [_gda ]=_b .LittleEndian .Uint32 (_aac [_gbf :_gbf +4]);_gda ++;};return _aca ;};func (_baf *Reader )ID ()string {return _baf .File [0].ID ()};
func (_ffe *File )changeSize (_fdff int64 )error {if _fdff ==_ffe .Size {return nil ;};var _fdb *File ;for _ ,_cbe :=range _ffe ._dga ._dbae {if _cbe .Name ==_ffe .Name {_fdb =_cbe ;break ;};};if _fdb ==nil {return _af .Errorf ("\u004e\u006f\u0020\u0064\u0069\u0072e\u0063\u0074\u006f\u0072\u0079\u0020\u0065\u006e\u0074\u0072\u0079\u0020\u0066o\u0072\u0020\u0061\u0020\u0066\u0069\u006ce\u003a\u0020\u0025\u0073",_ffe .Name );
};_ffc :=_a .NewBuffer ([]byte {});if _gag :=_b .Write (_ffc ,_b .LittleEndian ,_fdff );_gag !=nil {return _gag ;};for _aeg ,_aec :=range _ffc .Bytes (){_fdb ._faf [_aeg ]=_aec ;};var _ecga int64 ;var _abd bool ;if _ffe .Size < _abb {_abd =true ;_ecga =int64 (_caag );
}else {_ecga =int64 (_ffe ._dga ._egbf );};_cdc :=int ((_ffe .Size -1)/_ecga )+1;_cca :=int ((_fdff -1)/_ecga )+1;if _cdc < _cca {_cfg ,_dafb :=_ffe .findLast (_abd );if _dafb !=nil {return _dafb ;};_cbf ,_dafb :=_ffe ._dga .findNextFreeSector (_abd );
if _dafb !=nil {return _dafb ;};for _aee :=_cca -_cdc ;_aee > 0;_aee --{if _ded :=_ffe ._dga .saveToFatLocs (_cfg ,_cbf ,_abd );_ded !=nil {return _ded ;};if _aee > 1{_cfg =_cbf ;_cbf ++;}else if _ge :=_ffe ._dga .saveToFatLocs (_cbf ,_cad ,_abd );_ge !=nil {return _ge ;
};};}else if _cdc > _cca {_fad :=_ffe ._dbe ;var _ace error ;for _gcf :=0;_gcf < _cca -1;_gcf ++{_fad ,_ace =_ffe ._dga .findNext (_fad ,_abd );if _ace !=nil {return _ace ;};};if _fde :=_ffe ._dga .saveToFatLocs (_fad ,_cad ,_abd );_fde !=nil {return _fde ;
};};_ffe .Size =_fdff ;return nil ;};func (_daba Error )Typ ()int {return _daba ._dcf };func (_dde *Reader )Modified ()_g .Time {return _dde .File [0].Modified ()};const (ErrFormat =iota ;ErrRead ;ErrSeek ;ErrWrite ;ErrTraverse ;);func (_fgd *Reader )saveToFatLocs (_fdab uint32 ,_cga interface{},_dag bool )error {_abfg :=_a .NewBuffer ([]byte {});
if _fab :=_b .Write (_abfg ,_b .LittleEndian ,_cga );_fab !=nil {return _fab ;};_feg :=_fgd .findFatLocsOffset (_dag )+int64 (_fdab *4);_ ,_bfee :=_fgd ._fcce .WriteAt (_abfg .Bytes (),_feg );return _bfee ;};func (_gfe *File )ID ()string {return _gfe ._de .String ()};
func (_badc *File )Created ()_g .Time {return _badc ._edf .Time ()};type Error struct{_dcf int ;_agc string ;_geb int64 ;};func (_ceba *Reader )findNext (_aeb uint32 ,_cge bool )(uint32 ,error ){_ggad :=_ceba ._egbf /4;_ffce :=int (_aeb /_ggad );var _aaae uint32 ;
if _cge {if _ffce < 0||_ffce >=len (_ceba ._fgb ._bdad ){return 0,Error {ErrRead ,"\u006d\u0069\u006e\u0069\u0073e\u0063\u0074\u006f\u0072\u0020\u0069\u006e\u0064\u0065\u0078\u0020\u0069\u0073 \u006f\u0075\u0074\u0073\u0069\u0064\u0065\u0020\u006d\u0069\u006e\u0069\u0046\u0041\u0054\u0020\u0072\u0061\u006e\u0067\u0065",int64 (_ffce )};
};_aaae =_ceba ._fgb ._bdad [_ffce ];}else {if _ffce < 0||_ffce >=len (_ceba ._fgb ._eec ){return 0,Error {ErrRead ,"\u0046\u0041\u0054\u0020\u0069\u006e\u0064\u0065\u0078\u0020\u0069\u0073\u0020\u006f\u0075t\u0073i\u0064\u0065\u0020\u0044\u0049\u0046\u0041\u0054\u0020\u0072\u0061\u006e\u0067\u0065",int64 (_ffce )};
};_aaae =_ceba ._fgb ._eec [_ffce ];};_gac :=_aeb %_ggad ;_gaea :=_fbe (_ceba ._egbf ,_aaae )+int64 (_gac *4);_gbb ,_caf :=_ceba .readAt (_gaea ,4);if _caf !=nil {return 0,Error {ErrRead ,"\u0062\u0061\u0064\u0020\u0072\u0065\u0061\u0064\u0020\u0066i\u006e\u0064\u0069\u006e\u0067\u0020\u006ee\u0078\u0074\u0020\u0073\u0065\u0063\u0074\u006f\u0072\u0020\u0028"+_caf .Error ()+"\u0029",_gaea };
};_ecb :=_b .LittleEndian .Uint32 (_gbb );return _ecb ,nil ;};func (_cdg *File )Write (b []byte )(int ,error ){if _cdg .Size < 1||_cdg ._agfg >=_cdg .Size {return 0,_c .EOF ;};if _acg :=_cdg .ensureWriterAt ();_acg !=nil {return 0,_acg ;};_dgdc :=len (b );
if int64 (_dgdc )> _cdg .Size -_cdg ._agfg {_dgdc =int (_cdg .Size -_cdg ._agfg );};_ebg ,_eab :=_cdg .stream (_dgdc );if _eab !=nil {return 0,_eab ;};var _dec ,_gcb int ;for _ ,_dc :=range _ebg {_ecf :=_dec +int (_dc [1]);if _ecf < _dec ||_ecf > _dgdc {return 0,Error {ErrWrite ,"\u0062\u0061d\u0020\u0077\u0072i\u0074\u0065\u0020\u006c\u0065\u006e\u0067\u0074\u0068",int64 (_ecf )};
};_dgg ,_ae :=_cdg ._dga ._fcce .WriteAt (b [_dec :_ecf ],_dc [0]);_gcb =_gcb +_dgg ;if _ae !=nil {_cdg ._agfg +=int64 (_gcb );return _gcb ,Error {ErrWrite ,"\u0075n\u0064\u0065\u0072\u006c\u0079\u0069\u006e\u0067\u0020\u0077\u0072i\u0074\u0065\u0072\u0020\u0066\u0061\u0069\u006c\u0020\u0028"+_ae .Error ()+"\u0029",int64 (_dec )};
};_dec =_ecf ;};_cdg ._agfg +=int64 (_gcb );if _gcb !=_dgdc {_eab =Error {ErrWrite ,"\u0062\u0079t\u0065\u0073\u0020\u0077\u0072\u0069\u0074\u0074\u0065\u006e\u0020\u0064\u006f\u0020\u006e\u006f\u0074\u0020\u006d\u0061\u0074\u0063\u0068\u0020\u0065\u0078\u0070\u0065\u0063\u0074\u0065\u0064\u0020\u0077\u0072\u0069\u0074\u0065\u0020\u0073\u0069\u007a\u0065",int64 (_gcb )};
}else if _gcb < len (b ){_eab =_c .EOF ;};return _gcb ,_eab ;};type headerFields struct{_bdf uint64 ;_ [16]byte ;_bda uint16 ;_eeb uint16 ;_ [2]byte ;_bde uint16 ;_ [2]byte ;_ [6]byte ;_bgca uint32 ;_fga uint32 ;_cefd uint32 ;_ [4]byte ;_ [4]byte ;_efc uint32 ;
_cae uint32 ;_dad uint32 ;_eac uint32 ;_afc [109]uint32 ;};func (_fdgb *Reader )Next ()(*File ,error ){_fdgb ._abfe ++;if _fdgb ._abfe >=len (_fdgb .File ){return nil ,_c .EOF ;};return _fdgb .File [_fdgb ._abfe ],nil ;};func (_fg *Reader )setDirEntries ()error {_cg :=20;
if _fg ._fgb ._bgca > 0{_cg =int (_fg ._fgb ._bgca );};_bd :=make ([]*File ,0,_cg );_gb :=make (map[uint32 ]bool );_cc :=int (_fg ._egbf /_aagf );_ag :=_fg ._fgb ._cefd ;for _ag !=_cad {_df ,_deg :=_fg .readAt (_fbe (_fg ._egbf ,_ag ),int (_fg ._egbf ));
if _deg !=nil {return Error {ErrRead ,"\u0064\u0069\u0072\u0065\u0063\u0074\u006f\u0072\u0079\u0020e\u006e\u0074\u0072\u0069\u0065\u0073\u0020r\u0065\u0061\u0064\u0020\u0065\u0072\u0072\u006f\u0072\u0020\u0028"+_deg .Error ()+"\u0029",_fbe (_fg ._egbf ,_ag )};
};for _gc :=0;_gc < _cc ;_gc ++{_eg :=&File {_dga :_fg };_eg .directoryEntryFields =_bf (_df [_gc *int (_aagf ):]);_da (_fg ._fgb ._eeb ,_eg );_eg ._def =_eg ._dbe ;_bd =append (_bd ,_eg );};_ab ,_deg :=_fg .findNext (_ag ,false );if _deg !=nil {return Error {ErrRead ,"d\u0069\u0072\u0065\u0063\u0074\u006f\u0072\u0079\u0020\u0065\u006e\u0074\u0072\u0069\u0065\u0073\u0020\u0065r\u0072\u006f\u0072\u0020\u0066\u0069\u006e\u0064\u0069\u006eg \u0073\u0065\u0063t\u006fr\u0020\u0028"+_deg .Error ()+"\u0029",int64 (_ab )};
};if _ab <=_ag {if _ab ==_ag ||_gb [_ab ]{return Error {ErrRead ,"\u0064\u0069\u0072\u0065\u0063\u0074\u006f\u0072\u0079\u0020e\u006e\u0074\u0072\u0069\u0065\u0073\u0020s\u0065\u0063\u0074\u006f\u0072\u0020\u0063\u0079\u0063\u006c\u0065",int64 (_ab )};
};_gb [_ab ]=true ;};_ag =_ab ;};_fg ._dbae =_bd ;return nil ;};func (_eaf *File )Modified ()_g .Time {return _eaf ._ac .Time ()};func _gca (_fge [][2]int64 )[][2]int64 {_bgdc :=len (_fge );for _fda ,_ged :=0,0;_fda < _bgdc &&_ged +1< len (_fge );_fda ++{if _fge [_ged ][0]+_fge [_ged ][1]==_fge [_ged +1][0]{_fge [_ged ][1]=_fge [_ged ][1]+_fge [_ged +1][1];
for _acd :=range _fge [_ged +1:len (_fge )-1]{_fge [_ged +1+_acd ]=_fge [_acd +_ged +2];};_fge =_fge [:len (_fge )-1];}else {_ged +=1;};};return _fge ;};func (_fed *Reader )Created ()_g .Time {return _fed .File [0].Created ()};func (_cfgf *Reader )Debug ()map[string ][]uint32 {_caad :=map[string ][]uint32 {"s\u0065\u0063\u0074\u006f\u0072\u0020\u0073\u0069\u007a\u0065":[]uint32 {_cfgf ._egbf },"\u006d\u0069\u006e\u0069\u0020\u0066\u0061\u0074\u0020\u006c\u006f\u0063\u0073":_cfgf ._fgb ._bdad ,"\u006d\u0069n\u0069\u0020\u0073t\u0072\u0065\u0061\u006d\u0020\u006c\u006f\u0063\u0073":_cfgf ._fgb ._dfbg ,"\u0064\u0069r\u0065\u0063\u0074o\u0072\u0079\u0020\u0073\u0065\u0063\u0074\u006f\u0072":[]uint32 {_cfgf ._fgb ._cefd },"\u006d\u0069\u006e\u0069 s\u0074\u0072\u0065\u0061\u006d\u0020\u0073\u0074\u0061\u0072\u0074\u002f\u0073\u0069z\u0065":[]uint32 {_cfgf .File [0]._dbe ,_b .LittleEndian .Uint32 (_cfgf .File [0]._faf [:])}};
for _adeg ,_edfg :=_cfgf .Next ();_edfg ==nil ;_adeg ,_edfg =_cfgf .Next (){_caad [_adeg .Name +" \u0073\u0074\u0061\u0072\u0074\u002f\u0073\u0069\u007a\u0065"]=[]uint32 {_adeg ._dbe ,_b .LittleEndian .Uint32 (_adeg ._faf [:])};};return _caad ;};func (_aacfe *Reader )exportDifats (_gbag *_cb .Writer )error {if _aacfe ._fgb ._eac ==0{return nil ;
};return nil ;};func (_ce *File )mode ()_dg .FileMode {if _ce ._efd !=_fa {return _dg .ModeDir |0777;};return 0666;};func (_bfb *File )ReadAt (p []byte ,off int64 )(_bdd int ,_eba error ){_ced ,_fdg ,_abf :=_bfb ._agfg ,_bfb ._aff ,_bfb ._def ;_ ,_eba =_bfb .Seek (off ,0);
if _eba ==nil {_bdd ,_eba =_bfb .Read (p );};_bfb ._agfg ,_bfb ._aff ,_bfb ._def =_ced ,_fdg ,_abf ;return _bdd ,_eba ;};func (_bfd *Reader )exportMiniStream ()(*_cb .Writer ,*_cb .Writer ,error ){_gfa ,_abdb :=_cb .NewWriter (),_cb .NewWriter ();_egdb :=uint32 (0);
for _ ,_fbaf :=range _bfd .File {if _fbaf .Size ==0{continue ;};_fbaf .reset ();_fbaf ._dbe =_egdb ;_dcg :=int (_fbaf .Size )/int (_caag );if int (_fbaf .Size )%int (_caag )!=0{_dcg ++;};for _gdbd :=1;_gdbd < _dcg ;_gdbd ++{_egdb ++;if _dac :=_b .Write (_gfa ,_b .LittleEndian ,_egdb );
_dac !=nil {return nil ,nil ,_dac ;};};if _bab :=_b .Write (_gfa ,_b .LittleEndian ,_cad );_bab !=nil {return nil ,nil ,_bab ;};_egdb ++;if _ ,_bfg :=_c .Copy (_abdb ,_fbaf );_bfg !=nil {return nil ,nil ,_bfg ;};if _fca :=_abdb .AlignLength (64);_fca !=nil {return nil ,nil ,_fca ;
};};if _fgfag :=_gfa .FillWithByte (int (_bfd ._egbf )-_gfa .Len (),_fe );_fgfag !=nil {return nil ,nil ,_fgfag ;};if _defe :=_abdb .AlignLength (int (_bfd ._egbf ));_defe !=nil {return nil ,nil ,_defe ;};return _gfa ,_abdb ,nil ;};func (_gfd fileInfo )Mode ()_dg .FileMode {return _gfd .File .mode ()};
func _ga (_agg *File ){if _agg ._bb < 4||_agg ._bb > 64{return ;};_dab :=int (_agg ._bb /2-1);_agg .Initial =_agg ._ecg [0];var _cf int ;if !_db .IsPrint (rune (_agg .Initial )){_cf =1;};_agg .Name =string (_aa .Decode (_agg ._ecg [_cf :_dab ]));};func (_dgaf fileInfo )Size ()int64 {if _dgaf ._efd !=_fa {return 0;
};return _dgaf .File .Size ;};func (_bacb *Reader )setMiniStream ()error {if _bacb ._dbae [0]._dbe ==_cad ||_bacb ._fgb ._efc ==_cad ||_bacb ._fgb ._cae ==0{return nil ;};_cgf :=int (_bacb ._fgb ._cae );_bacb ._fgb ._bdad =make ([]uint32 ,_cgf );_bacb ._fgb ._bdad [0]=_bacb ._fgb ._efc ;
for _fbc :=1;_fbc < _cgf ;_fbc ++{_cac ,_afa :=_bacb .findNext (_bacb ._fgb ._bdad [_fbc -1],false );if _afa !=nil {return Error {ErrFormat ,"s\u0065\u0074\u0074\u0069ng\u0020m\u0069\u006e\u0069\u0020\u0073t\u0072\u0065\u0061\u006d\u0020\u0028"+_afa .Error ()+"\u0029",int64 (_bacb ._fgb ._bdad [_fbc -1])};
};_bacb ._fgb ._bdad [_fbc ]=_cac ;};_cgf =int (_bacb ._egbf /4*_bacb ._fgb ._cae );_bacb ._fgb ._dfbg =make ([]uint32 ,0,_cgf );_dega :=_bacb ._dbae [0]._dbe ;var _fgae error ;for _dega !=_cad {_bacb ._fgb ._dfbg =append (_bacb ._fgb ._dfbg ,_dega );_dega ,_fgae =_bacb .findNext (_dega ,false );
if _fgae !=nil {return Error {ErrFormat ,"s\u0065\u0074\u0074\u0069ng\u0020m\u0069\u006e\u0069\u0020\u0073t\u0072\u0065\u0061\u006d\u0020\u0028"+_fgae .Error ()+"\u0029",int64 (_dega )};};};return nil ;};func (_feb *Reader )readAt (_ead int64 ,_gba int )([]byte ,error ){if _feb ._ggc {_dea ,_fec :=_feb ._abfa .(slicer ).Slice (_ead ,_gba );
if _fec !=nil {return nil ,Error {ErrRead ,"\u0073\u006c\u0069\u0063er\u0020\u0072\u0065\u0061\u0064\u0020\u0065\u0072\u0072\u006f\u0072\u0020\u0028"+_fec .Error ()+"\u0029",_ead };};return _dea ,nil ;};if _gba > len (_feb ._bef ){return nil ,Error {ErrRead ,"\u0072\u0065ad\u0020\u006c\u0065n\u0067\u0074\u0068\u0020gre\u0061te\u0072\u0020\u0074\u0068\u0061\u006e\u0020re\u0061\u0064\u0020\u0062\u0075\u0066\u0066e\u0072",int64 (_gba )};
};if _ ,_gaa :=_feb ._abfa .ReadAt (_feb ._bef [:_gba ],_ead );_gaa !=nil {return nil ,Error {ErrRead ,_gaa .Error (),_ead };};return _feb ._bef [:_gba ],nil ;};const _ef int =64+4*4+16+4+8*2+4+8;func (_fbab *Reader )exportHeader (_ccge *_cb .Writer )error {if _bdc :=_b .Write (_ccge ,_b .LittleEndian ,&_fbab ._fgb ._bdf );
_bdc !=nil {return _bdc ;};if _gbfe :=_ccge .Skip (16);_gbfe !=nil {return _gbfe ;};if _fbce :=_b .Write (_ccge ,_b .LittleEndian ,&_fbab ._fgb ._bda );_fbce !=nil {return _fbce ;};if _dafg :=_b .Write (_ccge ,_b .LittleEndian ,&_fbab ._fgb ._eeb );_dafg !=nil {return _dafg ;
};if _fbd :=_b .Write (_ccge ,_b .LittleEndian ,uint16 (0xfffe));_fbd !=nil {return _fbd ;};if _ffb :=_b .Write (_ccge ,_b .LittleEndian ,&_fbab ._fgb ._bde );_ffb !=nil {return _ffb ;};if _bagg :=_b .Write (_ccge ,_b .LittleEndian ,uint16 (0x0006));_bagg !=nil {return _bagg ;
};if _acf :=_ccge .Skip (6);_acf !=nil {return _acf ;};if _baaa :=_b .Write (_ccge ,_b .LittleEndian ,&_fbab ._fgb ._bgca );_baaa !=nil {return _baaa ;};if _fae :=_b .Write (_ccge ,_b .LittleEndian ,&_fbab ._fgb ._fga );_fae !=nil {return _fae ;};if _fbdd :=_b .Write (_ccge ,_b .LittleEndian ,&_fbab ._fgb ._cefd );
_fbdd !=nil {return _fbdd ;};if _gcc :=_ccge .Skip (4);_gcc !=nil {return _gcc ;};if _bff :=_b .Write (_ccge ,_b .LittleEndian ,uint32 (0x00001000));_bff !=nil {return _bff ;};if _egf :=_b .Write (_ccge ,_b .LittleEndian ,&_fbab ._fgb ._efc );_egf !=nil {return _egf ;
};if _cffg :=_b .Write (_ccge ,_b .LittleEndian ,&_fbab ._fgb ._cae );_cffg !=nil {return _cffg ;};if _bbf :=_b .Write (_ccge ,_b .LittleEndian ,&_fbab ._fgb ._dad );_bbf !=nil {return _bbf ;};if _gefb :=_b .Write (_ccge ,_b .LittleEndian ,&_fbab ._fgb ._eac );
_gefb !=nil {return _gefb ;};for _ggb :=0;_ggb < 109;_ggb ++{if _edbf :=_b .Write (_ccge ,_b .LittleEndian ,&_fbab ._fgb ._afc [_ggb ]);_edbf !=nil {return _edbf ;};};return nil ;};func _da (_fc uint16 ,_cgb *File ){_ga (_cgb );if _cgb ._efd !=_fa {return ;
};if _fc > 3{_cgb .Size =int64 (_b .LittleEndian .Uint64 (_cgb ._faf [:]));}else {_cgb .Size =int64 (_b .LittleEndian .Uint32 (_cgb ._faf [:4]));};};func (_dcc Error )Error ()string {return "\u006ds\u0063\u0066\u0062\u003a\u0020"+_dcc ._agc +"\u003b\u0020"+_e .FormatInt (_dcc ._geb ,10);
};func (_aag fileInfo )ModTime ()_g .Time {return _aag .Modified ()};const _cbfb int =8+16+10+6+12+8+16+109*4;func (_fbf *Reader )Export ()([]byte ,error ){_egg :=_cb .NewWriter ();if _dgb :=_fbf .exportHeader (_egg );_dgb !=nil {return nil ,_dgb ;};if _aefb :=_egg .FillWithByte (512,_fe );
_aefb !=nil {return nil ,_aefb ;};_bce :=[]uint32 {};if _cccb :=_fbf .exportDifats (_egg );_cccb !=nil {return nil ,_cccb ;};_cebc ,_eed ,_cdb :=_fbf .exportMiniStream ();if _cdb !=nil {return nil ,_cdb ;};_bce =append (_bce ,uint32 (_egg .Len ())/_fbf ._egbf );
if _aabe :=_fbf .exportDirEntries (_egg );_aabe !=nil {return nil ,_aabe ;};_bce =append (_bce ,uint32 (_egg .Len ())/_fbf ._egbf );if _ ,_gebe :=_cebc .WriteTo (_egg );_gebe !=nil {return nil ,_gebe ;};_bce =append (_bce ,uint32 (_egg .Len ())/_fbf ._egbf );
if _ ,_gggf :=_eed .WriteTo (_egg );_gggf !=nil {return nil ,_gggf ;};_bce =append (_bce ,uint32 (_egg .Len ())/_fbf ._egbf );if _fba :=_fbf .exportFAT (_egg ,_bce );_fba !=nil {return nil ,_fba ;};return _egg .Bytes (),nil ;};type slicer interface{Slice (_ffcec int64 ,_ffdd int )([]byte ,error );
};