Sha256: 17c17df44e8207b407ecfd6b4cf3d22d8b71a52d7d8899a739a999388b53a09e

Contents?: true

Size: 294 Bytes

Versions: 1

Compression:

Stored size: 294 Bytes

Contents

module LZO
  module LZOP
    class LzoMethod < BinData::Primitive
      uint8be :val

      def map
        { M_LZO1X_1: 1, M_LZO1X_1_15: 2, M_LZO1X_999: 3 }
      end

      def get
        map.invert[val.to_i]
      end

      def set(v)
        self.val = map[v]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lzo-0.1.0 lib/lzo/lzop/lzo_method.rb