/*1* Compression API2*3* Copyright 2026 Chris Kadar4*5* This library is free software; you can redistribute it and/or6* modify it under the terms of the GNU Lesser General Public7* License as published by the Free Software Foundation; either8* version 2.1 of the License, or (at your option) any later version.9*10* This library is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU13* Lesser General Public License for more details.14*15* You should have received a copy of the GNU Lesser General Public16* License along with this library; if not, write to the Free Software17* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA18*/1920#include "compressapi.h"21#include "wine/debug.h"2223WINE_DEFAULT_DEBUG_CHANNEL(cabinet);2425/***********************************************************************26* CreateCompressor (CABINET.30)27*/28BOOL WINAPI CreateCompressor( DWORD algorithm, COMPRESS_ALLOCATION_ROUTINES *routines, COMPRESSOR_HANDLE *handle )29{30FIXME("algo (%lu) stub\n", algorithm);31return TRUE;32}3334/***********************************************************************35* Compress (CABINET.33)36*/37BOOL WINAPI Compress( COMPRESSOR_HANDLE handle, const VOID *data, SIZE_T data_size,38VOID *buffer, SIZE_T buffer_size, SIZE_T *compressed_data_size )39{40FIXME("stub\n");4142*compressed_data_size = data_size;4344if( buffer_size < data_size )45{46SetLastError( ERROR_INSUFFICIENT_BUFFER );47return FALSE;48}49memcpy(buffer, data, data_size);50return TRUE;51}5253/***********************************************************************54* CloseCompressor (CABINET.35)55*/56BOOL WINAPI CloseCompressor( COMPRESSOR_HANDLE handle )57{58FIXME("stub\n");59return TRUE;60}6162/***********************************************************************63* CreateDecompressor (CABINET.40)64*/65BOOL WINAPI CreateDecompressor( DWORD algorithm, COMPRESS_ALLOCATION_ROUTINES *routines, DECOMPRESSOR_HANDLE *handle )66{67FIXME("algo (%lu) stub\n", algorithm);68return TRUE;69}7071/***********************************************************************72* Decompress (CABINET.43)73*/74BOOL WINAPI Decompress( DECOMPRESSOR_HANDLE handle, const VOID *data, SIZE_T data_size,75VOID *buffer, SIZE_T buffer_size, SIZE_T *decompressed_data_size)76{77FIXME("stub\n");7879*decompressed_data_size = data_size;8081if( buffer_size < data_size )82{83SetLastError( ERROR_INSUFFICIENT_BUFFER );84return FALSE;85}86memcpy(buffer, data, data_size);87return TRUE;88}8990/***********************************************************************91* CloseCompressor (CABINET.45)92*/93BOOL WINAPI CloseDecompressor( DECOMPRESSOR_HANDLE handle )94{95FIXME("stub\n");96return TRUE;97}9899100