Search:

Type: Posts; User: hamster_nz

Page 1 of 11 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    43
    Views
    1,055

    I got a few spare minutes. Attached is a...

    I got a few spare minutes.

    Attached is a program that should decode a .gz file less than 8kb, and if you add "-v" on the command line it will print out things like code tables/dictionaries along...
  2. Replies
    43
    Views
    1,055

    If you can post a ASCII hex dump of *just* the...

    If you can post a ASCII hex dump of *just* the zlib data I will turn up the debug level on my code and print out the code tables.
  3. Replies
    43
    Views
    1,055

    The second table will never work - there are two...

    The second table will never work - there are two entries of length 1, so that uses both codes '0' & '1', leaving no other possible codes for longer length codes.

    A few posts ago supplied an edited...
  4. Replies
    43
    Views
    1,055

    PNG decoding progress going quite well - all the...

    PNG decoding progress going quite well - all the Basic images in PngSuite convert correctly to PPM.

    Might look at interlacing tonight..
  5. Replies
    43
    Views
    1,055

    zlib encoding for "hello hello hello hello" would...

    zlib encoding for "hello hello hello hello" would be

    3 bits - list block, uses default codeblook.
    8 bits - h
    8 bits - e
    8 bits - l
    8 bits - l
    8 bits - o
    8 bits - space
    8 bits - Symbol 268 -...
  6. Replies
    17
    Views
    369

    Back in the old days (of 16-bit IBM PCs) you had...

    Back in the old days (of 16-bit IBM PCs) you had "near pointers" "far pointers" and "huge pointers".

    'near' pointers were 16 bits, and could address up to 64k, but only in one block of memory -...
  7. Replies
    43
    Views
    1,055

    I feel there has been a lot of research put into...

    I feel there has been a lot of research put into zlib's scheme that shouldn't be discounted so quickly. For example, the way the code tables are bootstrapped is pretty neat and effective.

    Or for...
  8. Replies
    43
    Views
    1,055

    You did look at the code included in the post,...

    You did look at the code included in the post, where one is subtracted from the value returned before it is assigned?
  9. Replies
    43
    Views
    1,055

    Oh, thanks for that link to the test images... It...

    Oh, thanks for that link to the test images... It is proving invaluable.

    One thing I find really fascinating about zlib compression is that nowhere in the file can you point to a set of bits and...
  10. Replies
    43
    Views
    1,055

    I just tested it with a gz file I made with "echo...

    I just tested it with a gz file I made with "echo test | gzip > a.gz" and it crashed out.

    Cause was around line 680 - with a buffer overflow.



    lengi =...
  11. Replies
    43
    Views
    1,055

    I *think* this is what you want in BuildCodes():...

    I *think* this is what you want in BuildCodes():



    void BuildCodes( BUFF *Symbols, uint longest )
    {
    uint uid = 0;
    HUFFMAN_SYMBOL *symbols = Symbols->addr;
    for ( uint...
  12. Replies
    43
    Views
    1,055

    Here's my code for that, with error checking...

    Here's my code for that, with error checking removed for clarity:



    void codetable_generate(struct Codetable_entry *table, size_t len) {
    uint32_t next_code = 0;
    for(uint32_t pass_len =...
  13. Replies
    43
    Views
    1,055

    I ran you code against a test file, and got this...

    I ran you code against a test file, and got this output:




    main.c:281: symbols[ 0] (0x5560170045f0): src = 0, use = true, sym = '' ( 0), lit = '' ( 0), get = 0, len = 4, uid = 0010...
  14. Replies
    17
    Views
    369

    In the past I have been using "-Wall -pedantic",...

    In the past I have been using "-Wall -pedantic", but now also recently added "-Wextra", which for me picks up the mixing of mostly signed vs unsigned issues.

    It has shown me a lot of shabby/fuzzy...
  15. Replies
    43
    Views
    1,055

    Re-reading the spec, now I understand it and I...

    Re-reading the spec, now I understand it and I see I haven't honored that "all code lengths form a single sequence"

    Ah well, better fix it up...
  16. Replies
    43
    Views
    1,055

    I've got the hard parts of the "deflate"...

    I've got the hard parts of the "deflate" uncompressing written - now seems to inflate the original PNG data just fine (although I've still got to verify the ADLER32 checksum.

    Once again, maybe it...
  17. Replies
    43
    Views
    1,055

    Here's the decoding of the first part of the...

    Here's the decoding of the first part of the first 'dynamic dictionary' data block in the image in the original post (the first uses a fixed dictionary), in preparation for reading the actual full...
  18. Replies
    43
    Views
    1,055

    It's true what they say, premature optimization...

    It's true what they say, premature optimization is the source of all evil :D....

    (i.e. I am doing evil using >>3 and &7 )
  19. Replies
    43
    Views
    1,055

    I dpn't know if it is of any value, but here is...

    I dpn't know if it is of any value, but here is my prototype for getting and consuming bits from the compressed bitstream.



    static uint32_t grab_bits(struct Inflate_data *d) {
    uint32_t...
  20. Replies
    43
    Views
    1,055

    Are you decoding PNG 'deflate' compression by any...

    Are you decoding PNG 'deflate' compression by any chance?

    Inspired by your earlier posts I decided that I would attempt this too, and am making good progress.

    Shame the RFC is sort of mostly...
  21. Replies
    18
    Views
    612

    Having read throw the thread I have no clear idea...

    Having read throw the thread I have no clear idea of what you are trying to do, and why you want to do it.

    Are you able to give me some context to this?
  22. Have a read of: The Floating-Point Guide - What...

    Have a read of: The Floating-Point Guide - What Every Programmer Should Know About Floating-Point Arithmetic

    The issue is that the library is calculating pow(10,2) as something just slightly under...
  23. Replies
    2
    Views
    369

    1) See if there are any local programming...

    1) See if there are any local programming standards you have to follow. Indentation, style, portability, licensing, compiler options. Maybe there is a template you can use as the basis for your...
  24. Replies
    5
    Views
    421

    Is Google not working? selection sort in c -...

    Is Google not working?

    selection sort in c - Google Search

    Third hit for me looks OK:

    Selection sort in C | Programming Simplified
  25. GitHub - hamsternz/miniweb: A small, lightweight...

    GitHub - hamsternz/miniweb: A small, lightweight web server - On a Pi 400, 1000 request per second.

    On a laptop 6,000 requests per second on a single core.



    Server Hostname: localhost...
Results 1 to 25 of 259
Page 1 of 11 1 2 3 4