Menu

A question about encoder

Shmerl
2011-05-31
2013-04-29
  • Shmerl

    Shmerl - 2011-05-31

    I was trying to use your encoder, but I have a question regarding it's logic. Why do you add '\n' in end block encoding? (It actually makes it unusable without modification for my case). And how is this used exactly?

                if (state_in->stepcount == CHARS_PER_LINE/4)
                {
                    *codechar++ = '\n';
                    state_in->stepcount = 0;
                }
    

    Changing around CHARS_PER_LINE value doesn't seem to affect anything, and what is the intended use? I actually don't need to break the result in any lines, I need to get just a continuous encoded string.

    Thanks.

     
  • Shmerl

    Shmerl - 2011-05-31

    Oh, my wrong, it does affect it for values like 4, 8 etc.
    I just commented out the section above, and also one in the end block decoding, to avoid any '\n' insertions. I'd be nice to add that as an option in your encoder somehow.

     

Log in to post a comment.