beginner plzz help urgent

This is a discussion on beginner plzz help urgent within the C Programming forums, part of the General Programming Boards category; THIS code is of SMurf & corrected by swoopy
plzzz can some one give me whole program means its main ...

beginner plzz help urgent

THIS code is of SMurf & corrected by swoopy

plzzz can some one give me whole program means its main function & also comments on each line which help me in understanding this prog as i cant understand
why
mask1 = 0x7F;
mask2 = 0x40;
rshift = 6;
this take & while (src - in < 17280)this also why only 17280?
& also not understand some function also so plzzzzzz help me in this regard & plzz give me main function with comments if u can
thanks in advance.
its urgent plzz.

Hello,

I'm trying to write two small functions that compresses/decompresses 7-bit data that is packed together into 8 bits. These are my alogrithms:-

Decided it's time for a bit of a clamp-down on the recent spate of people bumping and slopping "urgent" all over their posts.

> can some one give me whole program means its main function & also comments on each line
I dunno - maybe trying to do your own homework first and posting an attempt rather than expecting to luck upon a fully documented answer you can just hand it in.

As for the rest of it, simple things like & and 0x notation should be explained in any half-decent C book - read yours.

Randomly guessing at what should be there is the worst possible way to try and figure out how to use something. You obviously want to use some sort of compression, why not just use zlib, it is a library that has plenty of ways to compress data.

Really like I said above (which you didn't read if my guess is correct) this is too advanced for you, go learn other stuff first. If this is for a class, then you need to talk to your teacher/counselor about when you can go in for extra help or how you can go about transferring to a lower level class. That code that you are trying to use is not C++ 101 level stuff, (granted it isn't much higher than that, but wouldn't be in a first course).

Get yourself a good C book (there are plenty recommended above.

Also, it is 'please' not 'plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' stop the internet dude talk, it just makes you look ignorant(if not stupid) and immature, and this is a pretty mature place where people have mature conversations. (Even if in real life you are immature half the time, like me, show you can talk like an adult)

void main ( pointed out by manutd ) is incorrect. Your code does not make any sense in the slightest, and people can't understand it. conio.h is non-standard, and the compress function does little to boost the code meaning.

Read all the above replys and get a beginners C book. You should do somthing like this: