Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4634

PackedInts: streaming API that supports variable numbers of bits per value

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • core/other
    • None
    • New

    Description

      It could be convenient to have a streaming API (writers and iterators, no random access) that supports variable numbers of bits per value. Although this would be much slower than the current fixed-size APIs, it could help save bytes in our codec formats.

      The API could look like:

      Iterator {
        long next(int bitsPerValue);
      }
      
      Writer {
        void write(long value, int bitsPerValue); // assert PackedInts.bitsRequired(value) <= bitsPerValue;
      }
      

      Attachments

        1. LUCENE-4634.patch
          8 kB
          Adrien Grand

        Activity

          People

            jpountz Adrien Grand
            jpountz Adrien Grand
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: