Package com.orbbec.obsensor.datatype

## Class CompressionParams

- java.lang.Object
- - com.orbbec.obsensor.DataType
  - - com.orbbec.obsensor.datatype.CompressionParams

    public class CompressionParams
    extends DataType

Compression parameters

### Constructor Summary

Constructors
`CompressionParams()`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `BYTES()` Get the number of bytes occupied by the Native structure
`int` `getThreshold()` Getter, Lossy compression threshold, range [0~255], recommended value is 9, the higher the threshold, the higher the compression ratio.
`protected boolean` `parseBytesImpl​(byte[] bytes)` Specific class implementation parsing, pay attention to the internal order and length of the structure
`void` `setThreshold​(int threshold)` Setter, Lossy compression threshold, range [0~255], recommended value is 9, the higher the threshold, the higher the compression ratio.
`java.lang.String` `toString()`
`protected boolean` `wrapBytesImpl​(byte[] bytes)` Specific class attribute encapsulation, pay attention to the internal order and length of the structure

### Methods inherited from class com.orbbec.obsensor.DataType

`checkInitialized, getBytes, parseBytes, throwInitializeException, wrapBytes`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### CompressionParams

    public CompressionParams()

### Method Detail

#### setThreshold

    public void setThreshold​(int threshold)

Setter, Lossy compression threshold, range [0~255], recommended value is 9, the higher the threshold, the higher the compression ratio.

Parameters:
  `threshold` - Lossy compression threshold

#### getThreshold

    public int getThreshold()

Getter, Lossy compression threshold, range [0~255], recommended value is 9, the higher the threshold, the higher the compression ratio.

Returns:
  Lossy compression threshold

#### BYTES

    public int BYTES()

Description copied from class: `DataType`
Get the number of bytes occupied by the Native structure

Specified by:
  `BYTES` in class `DataType`
Returns:
  The number of bytes occupied by the Native structure

#### parseBytesImpl

    protected boolean parseBytesImpl​(byte[] bytes)

Description copied from class: `DataType`
Specific class implementation parsing, pay attention to the internal order and length of the structure

Specified by:
  `parseBytesImpl` in class `DataType`
Parameters:
  `bytes` - byte array to be parsed
Returns:
  Parsing result, false: parsing failed, true: parsing succeeded

#### wrapBytesImpl

    protected boolean wrapBytesImpl​(byte[] bytes)

Description copied from class: `DataType`
Specific class attribute encapsulation, pay attention to the internal order and length of the structure

Specified by:
  `wrapBytesImpl` in class `DataType`
Parameters:
  `bytes` - The generated byte array to be encapsulated
Returns:
  Encapsulation result, false: Encapsulation failed, true: Encapsulation succeeded

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`