All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.epam.parso.impl.Decompressor Maven / Gradle / Ivy

Go to download

Parso is a lightweight Java library designed to read SAS7BDAT datasets. The Parso interfaces are analogous to libraries designed to read table-storing files, for example, CSVReader library. Despite its small size, the Parso library is the only full-featured open-source solution to process SAS7BDAT datasets, both uncompressed, CHAR-compressed and BIN-compressed. It is effective in processing clinical and statistical data often stored in SAS7BDAT format. Parso allows converting data into CSV format.

The newest version!
/**
 * *************************************************************************
 * Copyright (C) 2015 EPAM

 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * *************************************************************************
 */

package com.epam.parso.impl;

/**
 * Interface which should be implemented in all data decompressors.
 */
interface Decompressor {

    /**
     * The function to decompress data. Compressed data are an array of bytes with control bytes and data bytes.
     * The project documentation contains descriptions of the decompression algorithm.
     *
     * @param offset       the offset of bytes array in page that contains compressed data.
     * @param srcLength    the length of bytes array that contains compressed data.
     * @param resultLength the length of bytes array that contains decompressed data.
     * @param page         an array of bytes with compressed data.
     * @return an array of bytes with decompressed data.
     */
    byte[] decompressRow(int offset, int srcLength, int resultLength, byte[] page);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy