Ejemplo n.º 1
0
BOOL hb_LZSSxDecompressFile( HB_FHANDLE hInput, HB_FHANDLE hOutput )
{
   PHB_LZSSX_COMPR pCompr;
   BOOL fResult;

   pCompr = hb_LZSSxInit( hInput, NULL, 0, hOutput, NULL, 0 );
   fResult = hb_LZSSxDecode( pCompr );
   hb_LZSSxExit( pCompr );
   return fResult;
}
Ejemplo n.º 2
0
HB_BOOL hb_LZSSxDecompressFile( PHB_FILE pInput, PHB_FILE pOutput )
{
   PHB_LZSSX_COMPR pCompr;
   HB_BOOL fResult;

   pCompr = hb_LZSSxInit( pInput, NULL, 0, pOutput, NULL, 0 );
   fResult = hb_LZSSxDecode( pCompr );
   hb_LZSSxExit( pCompr );
   return fResult;
}
Ejemplo n.º 3
0
BOOL hb_LZSSxCompressFile( HB_FHANDLE hInput, HB_FHANDLE hOutput, ULONG * pulSize )
{
   PHB_LZSSX_COMPR pCompr;
   ULONG ulSize;

   pCompr = hb_LZSSxInit( hInput, NULL, 0, hOutput, NULL, 0 );
   ulSize = hb_LZSSxEncode( pCompr );
   hb_LZSSxExit( pCompr );
   if( pulSize )
      *pulSize = ulSize;
   return ulSize != ( ULONG ) -1;
}
Ejemplo n.º 4
0
BOOL hb_LZSSxDecompressMem( BYTE * pSrcBuf, ULONG ulSrcLen,
                            BYTE * pDstBuf, ULONG ulDstLen )
{
   PHB_LZSSX_COMPR pCompr;
   BOOL fResult;

   pCompr = hb_LZSSxInit( FS_ERROR, pSrcBuf, ulSrcLen,
                          FS_ERROR, pDstBuf, ulDstLen );
   fResult = hb_LZSSxDecode( pCompr );
   hb_LZSSxExit( pCompr );
   return fResult;
}
Ejemplo n.º 5
0
HB_BOOL hb_LZSSxCompressFile( PHB_FILE pInput, PHB_FILE pOutput, HB_SIZE * pnSize )
{
   PHB_LZSSX_COMPR pCompr;
   HB_SIZE nSize;

   pCompr = hb_LZSSxInit( pInput, NULL, 0, pOutput, NULL, 0 );
   nSize = hb_LZSSxEncode( pCompr );
   hb_LZSSxExit( pCompr );
   if( pnSize )
      *pnSize = nSize;
   return nSize != ( HB_SIZE ) -1;
}
Ejemplo n.º 6
0
HB_BOOL hb_LZSSxDecompressMem( const char * pSrcBuf, HB_SIZE nSrcLen,
                               char * pDstBuf, HB_SIZE nDstLen )
{
   PHB_LZSSX_COMPR pCompr;
   HB_BOOL fResult;

   pCompr = hb_LZSSxInit( NULL, ( const HB_BYTE * ) pSrcBuf, nSrcLen,
                          NULL, ( HB_BYTE * ) pDstBuf, nDstLen );
   fResult = hb_LZSSxDecode( pCompr );
   hb_LZSSxExit( pCompr );
   return fResult;
}
Ejemplo n.º 7
0
BOOL hb_LZSSxCompressMem( BYTE * pSrcBuf, ULONG ulSrcLen,
                          BYTE * pDstBuf, ULONG ulDstLen,
                          ULONG * pulSize )
{
   PHB_LZSSX_COMPR pCompr;
   ULONG ulSize;

   pCompr = hb_LZSSxInit( FS_ERROR, pSrcBuf, ulSrcLen,
                          FS_ERROR, pDstBuf, ulDstLen );
   ulSize = hb_LZSSxEncode( pCompr );
   hb_LZSSxExit( pCompr );
   if( pulSize )
      *pulSize = ulSize;
   return ( ulSize <= ulDstLen );
}
Ejemplo n.º 8
0
HB_BOOL hb_LZSSxCompressMem( const char * pSrcBuf, HB_SIZE nSrcLen,
                             char * pDstBuf, HB_SIZE nDstLen,
                             HB_SIZE * pnSize )
{
   PHB_LZSSX_COMPR pCompr;
   HB_SIZE nSize;

   pCompr = hb_LZSSxInit( NULL, ( const HB_BYTE * ) pSrcBuf, nSrcLen,
                          NULL, ( HB_BYTE * ) pDstBuf, nDstLen );
   nSize = hb_LZSSxEncode( pCompr );
   hb_LZSSxExit( pCompr );
   if( pnSize )
      *pnSize = nSize;
   return nSize <= nDstLen;
}