Question: void Conpross ( const char * _ outputfile ) f / f TOCO: Inplenent this mothad EenorateEncodingTable ( ) ; EeneratefrequencyTable ( ) ; EenerateLeaflist
void Conprossconst charoutputfile f
f TOCO: Inplenent this mothad
EenorateEncodingTable ;
EeneratefrequencyTable ;
EenerateLeaflist ;
EencrateTreo ;
std: :ofstrean conpFleoutputFle std::os::bnary
f Icompileopen
f
roturn;
for st ;;
f
unsigned int freq mFrequencyTable;
conpFlemriterointerpretcast echaras sfreq slaesfunsigned int;
unsigned int fleze ;
std::fstrean npatFleaFlelkne, std::s::bnary:
f InputFleopenO
f
roturn;
char filechar;
std: ivectorsboots bufferbit;
while inputFle gotflechar
f
unsigned char conpohar statlccasteunsigned charsflechar;
std: :vectoreboots encodesits rEncodingTablecenpohar;
for bool bit : encedosits
f
bufforBt purhbackbt;
If bufforBt
f
unsigned char byto ;
for ;;
t
f bafforeat
i
byte ;
compFtemterointerprotcastecharssobyte sixeofunsigned char;
bufforBit erasebufferstt begin bufferbit.begin ;
i
i
while bufferBit can someone help me implement the bitofstream into my coede 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
