Page 4 of 4 FirstFirst ... 234
Results 91 to 96 of 96

Thread: Needs ready to run C# Arithmetic Coder to simple accept input Symbols

  1. #91
    Member
    Join Date
    Apr 2012
    Location
    London
    Posts
    242
    Thanks
    12
    Thanked 0 Times in 0 Posts
    >>
    Update:
    I converted your file to binary and tested all 3 versions of sh_v2f coder (increment,static,decrement), all 3 seem to decode correctly.

    Attached Files


    can you post your text to binary converter please ...

    so far its remote developer testing , can you show me command to type to activate run your range coder encode and decode parameters format

  2. #92
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,329
    Thanks
    209
    Thanked 1,004 Times in 529 Posts
    Previous archives included perl scripts which I used to convert files,
    but okay, here's a C++ utility for the same thing, its easier than explaining perl.

    As to commandline syntax, open .bat files in texteditor and look how utilities are used.
    Commonly its "coder c input output" to compress a file, and "coder d input output" to decompress.
    Attached Files Attached Files

  3. Thanks:

    LawCounsels (26th May 2019)

  4. #93
    Member
    Join Date
    Apr 2012
    Location
    London
    Posts
    242
    Thanks
    12
    Thanked 0 Times in 0 Posts
    I see now it's time for me to get to know hands-on a Littlemore....

    With the C++ encoder producing 'pure' compressed bitstring.... Then can this compressed 'pure' bitstring be simply passed as parameter to C++ decoder, nothing more ( Original multiplicities etc?)??

    Not likely, one needs pass on the original multiplicities parameters too. ( unless c++ remembers these multiplicities)

  5. #94
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,329
    Thanks
    209
    Thanked 1,004 Times in 529 Posts
    Normally an arithmetic coder works with streams rather than strings or arrays.
    In some cases it might require additional data besides input stream - like the frequency table in static/decrement model.

    It is easy enough to port a coder to work with arrays too - although you'd normally pass address and length rather than
    a "single" array/vector/string object.

    But to work with actual strings (presumably of printable characters) coders would have to be specially modified...
    it might be easier to just use the "bit" utility for byte-to-bit conversion (I posted it before in 013.rar).
    For example, this coder: http://nishi.dreamhosters.com/u/marc_v2a.rar can be modified to write/read bitstrings
    by running it with "01" alphabet.

  6. #95
    Member
    Join Date
    Apr 2012
    Location
    London
    Posts
    242
    Thanks
    12
    Thanked 0 Times in 0 Posts
    remote developer spent quite some time with sh_v2f_static encode / decode , but not thorough consistent decodes correct yet

    this c++ encoder produces 'pure' nearest to optimum combinatorics model entropy ( +1 bit over ) from SAMPLE.bin ( assumes requires to be in .bin , convertible using your utility ) , but when c++ activated again to decode from this 'pure' to reconstructs original input.bin presumably it remembers original multiplicities value internally ???? ( remote developer assumes attempts to initialse set these internal values all correctly as originally ! )

    I assume thats how sh_v2f c++ encode/decodes works at present ( ie c++ encode then immediate decode when original multuplicities still recorded internally) ?

    [ in particular: after pointing DOS to sh_v2f directory, do I then type "sh_v2f e SAMPLE1A.TXT.bin COMP1a.bin to encode, THEN type ' sh_v2f d COMP1A.bin RST1a.bin to reconstruct?? ................ YES FOUND this .bat now in 017 folder test.bat test_frq.bat test_static.bat ]
    Last edited by LawCounsels; 27th May 2019 at 11:07.

  7. #96
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,329
    Thanks
    209
    Thanked 1,004 Times in 529 Posts
    1. v2f_static is probably not the right one. We discussed it multiple times here, I think the one that matched your entropy estimation was the one with decrements.
    I originally posted it in "freqtable_v0.rar" archive.

    2. It doesn't remember anything "internally". There's an explicit frequency table, stored in a separate file by the console coder.

    3. Read the .bat files. Yes, with normal sh_v2f that would work, while for static/frq the syntax is:
    sh_v2f_frq c SAMPLE1.bin SAMPLE1.ari SAMPLE1.frq
    sh_v2f_frq d SAMPLE1.ari SAMPLE1.rst SAMPLE1.frq

    4. Yes, the frequency table is not included in compressed data and is passed around as is instead.
    But that's what matches your entropy estimation.

  8. Thanks:

    LawCounsels (27th May 2019)

Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. Witten-Cleary arithmetic coder
    By Marco_B in forum Data Compression
    Replies: 1
    Last Post: 31st March 2017, 16:38
  2. Division-free arithmetic coder
    By Bulat Ziganshin in forum Data Compression
    Replies: 17
    Last Post: 19th May 2016, 03:12
  3. Minimal Ashford arithmetic-coder termination
    By Ethatron in forum Data Compression
    Replies: 18
    Last Post: 15th January 2011, 15:38
  4. M99 v.2.2 is ready
    By michael maniscalco in forum Data Compression
    Replies: 11
    Last Post: 22nd July 2008, 23:24
  5. flzp_ac2 (flzp + an order-2 arithmetic coder)
    By inikep in forum Data Compression
    Replies: 4
    Last Post: 25th June 2008, 22:37

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •