Class ReedSolomonEncoder


  • final class ReedSolomonEncoder
    extends java.lang.Object
    Implements Reed-Solomon encoding, as the name implies.
    • Constructor Summary

      Constructors 
      Constructor Description
      ReedSolomonEncoder​(GF256 field)
      Creates a SolomonEncoder object based on a GF256 object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private GF256Poly buildGenerator​(int degree)  
      void encode​(int[] toEncode, int ecBytes)
      Encodes the provided data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • field

        private final GF256 field
      • cachedGenerators

        private final java.util.List<GF256Poly> cachedGenerators
    • Constructor Detail

      • ReedSolomonEncoder

        public ReedSolomonEncoder​(GF256 field)
        Creates a SolomonEncoder object based on a GF256 object. Only QR codes are supported at the moment.
        Parameters:
        field - the galois field
    • Method Detail

      • buildGenerator

        private GF256Poly buildGenerator​(int degree)
      • encode

        public void encode​(int[] toEncode,
                           int ecBytes)
        Encodes the provided data.
        Parameters:
        toEncode - data to encode
        ecBytes - error correction bytes