Question: woid Deconpress ( const char * _ outputFile ) f / / TDCO: Inplenent this nethed std:: 1 fstroan f 1 le ( af 1
woid Deconpressconst charoutputFile
TDCO: Inplenent this nethed
std::fstroan fleaflellans, std::s::binary;
std: ofstreal conpfleoutputfile std::s::binary;
If Ifileopen II cenpfileopen
f
roturn;
for st ;;
f
unsigned int freq:
nFrequencyTable freq:
unsigned int fle;
fle roadrointerprotcast echares ifle sizeofunsigned int;
mfrequencyTable flessize;
EenerateEncodingTable :
EenerateFrequencyTable :
EenerateTree ;
Cenerateleaflist :
Huffilode curriNdoe melost;
int bythead
whle bythoad filesze
f
char byte;
If Iflereadrointerpintcastecharas obyte slaeofuncigned char
f
broak;
for ;;
f
bool bit byto &;
If bit
f
currtidoe currillowsright;
olso
f
currildoe currilloeleft;
If curridoesleft nullptr sis curridoesright nullptr
f
curridoe meost;
bytRead ;
f bytioad flesize
i
broak:
file close;
esepfile close ; can someone help me implement bitifstream please
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
