Input lines length limitation

  • Anonymous - 2011-09-13

    First, thank you for SFK. What a great tool. You have no idea how many times it help me in my day-to-day job.

    I was wondering why is there a limit of 4000 characters on input lines when using "SFK filter".
    Is this a limitation of the programming language SFK is written in, or is it self-imposed?
    Can this limitation be removed or expanded?

    I'm currently dealing with a file that I'm trying to process which has close to 10,000 characters in one line, and increasing the input characters allowed would be great.

    Thank you!

  • stahlworks

    stahlworks - 2011-09-15

    The max line length is defined in sfkbase.hpp as

    #define MAX_LINE_LEN 4096

    and whoever is able to compile SFK himself can easily change this.
    (Windows: try Visual C++ Express, or mingw with gcc.
    Linux: sudo apt-get install gcc (or g++))

    I don't want to provide binaries modified this way -
    you need 10k long lines, another user needs 100k lines
    or 10 MB long lines, it's unpredictable.

    I'll wrote down to check if I can add an option
    to change the max line length at runtime. If feasible,
    it would mean at least many code changes, so it can't
    promise any solution right now.

  • Anonymous - 2011-09-16

    In my case it was a list of IP addresses separated by commas.
    I ended up using SFK to replace any "10." with the hex code E1, every "255" with E2, and the same for many other patterns that seem to repeat themselves in that list. This significantly shortened it.
    I then did the manipulation I needed, and then reversed the process to get my IP addresses back.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks