package com.jscape.zip;

import java.util.EventObject;

public class DecompressionEvent
        extends EventObject {

    private double decompressedBytes = 0d;
    private ProgressEventMode mode;

    /**
     * Creates a DecompressionEvent object
     *
     * @param source            - the source object
     * @param decompressedBytes - the number of bytes de-compressed.
     */
    public DecompressionEvent(final Object source, double decompressedBytes, ProgressEventMode mode) {
        super(source);
        this.decompressedBytes = decompressedBytes;
        this.mode = mode;
    }

    /**
     * Get progress event mode.
     *
     * @return mode
     */
    public ProgressEventMode getMode() {
        return this.mode;
    }

    /**
     * Get the number of bytes de-compressed.
     *
     * @return bytes
     */
    public double getDecompressedBytes() {
        return this.decompressedBytes;
    }
}
