Skip to content
Snippets Groups Projects
  1. Feb 28, 2023
  2. Feb 27, 2023
  3. Feb 17, 2023
  4. Jan 13, 2023
  5. Jan 06, 2023
  6. Jan 05, 2023
  7. Dec 21, 2022
  8. Dec 20, 2022
    • Sven M. Hallberg's avatar
      style/comment · e10c9f98
      Sven M. Hallberg authored
      e10c9f98
    • Sven M. Hallberg's avatar
      lzw: simplify grammar by using h_bind to choose code length · 8e6bcd9c
      Sven M. Hallberg authored
      This replaces the validations on code9 etc. with one continuation that
      picks the appropriate parser.
      
      Also relaxes the parser to allow further output codes after the table is
      full. Looking at the spec, it seems to me at this times that the
      requirement for a clear code when the table is full is a requirement on
      producers of PDF files, but not on the file format itself. As far as I
      understand, conforming files can be created by a non-conforming process.
      
      Note: The implementation uses a slight trick to handle the last code
      (4095) correctly. Quoting the comment in act_output():
      
          Rather than going through the effort of ensuring that the last
          code is only updated once, we simply assign one more code as a
          dummy.
      
      So, the table is now 4097 entries in actual size. The last one will
      receive a bogus update every cycle, so that the last real code does not.
      This is less work than actually detecting and avoiding the bogus updates.
      8e6bcd9c
  9. Dec 19, 2022
Loading