edu.northwestern.at.utils

## Class CompressedSerializer

- java.lang.Object
- - edu.northwestern.at.utils.CompressedSerializer

- All Implemented Interfaces:
    Serializer

      public class CompressedSerializer
      extends java.lang.Object
      implements Serializer

  Serialize and unserialize objects with GZIP compression.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompressedSerializer()` Create a compressed serializer.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `deserializeFromBytes(byte[] serializedObject)` Deserialize an object from a compressed array of bytes.
    `byte[]` | `serializeToBytes(java.lang.Object object)` Serialize an object to a compressed array of bytes.

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

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

- - ### Constructor Detail

    - #### CompressedSerializer

          public CompressedSerializer()

      Create a compressed serializer.

  - ### Method Detail

    - #### serializeToBytes

          public byte[] serializeToBytes(java.lang.Object object)
                                  throws java.io.IOException

      Serialize an object to a compressed array of bytes.
      Specified by:
        `serializeToBytes` in interface `Serializer`
      Parameters:
        `object` - The object to serialize.
      Returns:
        Serialized object as a compressed array of bytes.
      Throws:
        `java.io.IOException`

    - #### deserializeFromBytes

          public java.lang.Object deserializeFromBytes(byte[] serializedObject)
                                                throws java.io.IOException,
                                                       java.lang.ClassNotFoundException

      Deserialize an object from a compressed array of bytes.
      Specified by:
        `deserializeFromBytes` in interface `Serializer`
      Parameters:
        `serializedObject` - Array of bytes containing a compressed serialized object.
      Returns:
        The deserialized object.
      Throws:
        `java.io.IOException`
        `java.lang.ClassNotFoundException`