001/* 002 * This file is part of lzo-java, an implementation of LZO in Java. 003 * https://github.com/shevek/lzo-java 004 * 005 * The Java portion of this library is: 006 * Copyright (C) 2011 Shevek <shevek@anarres.org> 007 * All Rights Reserved. 008 * 009 * The preprocessed C portion of this library is: 010 * Copyright (C) 2006-2011 Markus Franz Xaver Johannes Oberhumer 011 * All Rights Reserved. 012 * 013 * This library is free software; you can redistribute it and/or 014 * modify it under the terms of the GNU General Public License 015 * as published by the Free Software Foundation; either version 016 * 2 of the License, or (at your option) any later version. 017 * 018 * This library is distributed in the hope that it will be useful, 019 * but WITHOUT ANY WARRANTY; without even the implied warranty 020 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 021 * See the GNU General Public License for more details. 022 * 023 * You should have received a copy of the GNU General Public 024 * License along with the LZO library; see the file COPYING. 025 * If not, see <http://www.gnu.org/licenses/> or write to the 026 * Free Software Foundation, Inc., 51 Franklin Street, Fifth 027 * Floor, Boston, MA 02110-1301, USA. 028 029 * As a special exception, the copyright holders of this file 030 * give you permission to link this file with independent 031 * modules to produce an executable, regardless of the license 032 * terms of these independent modules, and to copy and distribute 033 * the resulting executable under terms of your choice, provided 034 * that you also meet, for each linked independent module, 035 * the terms and conditions of the license of that module. An 036 * independent module is a module which is not derived from or 037 * based on this library or file. If you modify this file, you may 038 * extend this exception to your version of the file, but 039 * you are not obligated to do so. If you do not wish to do so, 040 * delete this exception statement from your version. 041 */ 042package org.anarres.lzo; 043 044import javax.annotation.Nonnull; 045 046/** 047 * 048 * @author shevek 049 */ 050public interface LzoTransformer { 051 052 public static final int LZO_E_OK = 0; 053 public static final int LZO_E_ERROR = -1; 054 public static final int LZO_E_OUT_OF_MEMORY = -2; 055 public static final int LZO_E_NOT_COMPRESSIBLE = -3; 056 public static final int LZO_E_INPUT_OVERRUN = -4; 057 public static final int LZO_E_OUTPUT_OVERRUN = -5; 058 public static final int LZO_E_LOOKBEHIND_OVERRUN = -6; 059 public static final int LZO_E_EOF_NOT_FOUND = -7; 060 public static final int LZO_E_INPUT_NOT_CONSUMED = -8; 061 062 @Nonnull 063 public LzoAlgorithm getAlgorithm(); 064 065 @Nonnull 066 public LzoConstraint[] getConstraints(); 067 068 @Nonnull 069 public String toErrorString(int code); 070}