Jump to content

compress a file using bitwise operation

- - - - -

  • Please log in to reply
5 replies to this topic

#1
eman ahmed

eman ahmed

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
Hi,All

I'm now working in project to compress a files.

And I used Huffman encoding to get new code for each character in the site.

but now I can't complete my project.

How can I use bitwise operation to put all those new codes into the compression file.

and Also how can return it to its original characters.

I'm really need a help in this as i searched on Google and can't got any thing

any help will be useful to me.

Thanks,

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
It depends a lot on the language as to what the bitwise operators are. Many use ^, |, and &, for example, but others do not.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
eman ahmed

eman ahmed

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
I know that.
but if I works with & for example to anding 3 or four numbers and then put the new number in the compressed file how can I decompress file and get the original codes.

Knowing that I works with c++.

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
You will have to use the decompression algorithm.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
eman ahmed

eman ahmed

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
where is it ??

#6
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Huffman coding - Wikipedia, the free encyclopedia
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users