On Mon, 31 May 2010, Bicahi Esgici wrote: Hi,
> - Does Harbour have COMPRESSSTRING(), UNCOMPRESSSTRING() functions ? > (equivalents (?) of xHarbour's CHARPACK() and CHARUNPACK() functions) > ( According to a Harbour.chm, yes; according to hbmk2, no; even REQUEST; > ( undefined reference to ... ) ) I do not know COMPRESSSTRING() and UNCOMPRESSSTRING() and AFAIK xHarbour does not contain such functions. CHARPACK() and CHARUNPACK() are Clipper Tools functions which exists in HBCT library. To use them you have to add HBCT library to linked library list using '-lhbct' hbmk2 switch. Both Harbour and xHarbour use the same implementation of this function which supports only method 0 and method 1 (bit oriented algorithm in CA-CT3) is not supported. Harbour has also few other compression method much more efficient. In core code it support SIX3 compatible compression Sx_Compress()/ Sx_Decompress() and ZLIB compatible HB_ZCOMPRESS()/HB_ZUNCOMPRESS(). In hbbz2 library it also supports BZIP2 compression HB_BZ2_COMPRESS()/ HB_BZ2_UNCOMPRESS(). It needs BZIP2 compression library and -lhbbz2 -lbz2 hbmk2 switches. HBBZ2 library is not available in Harbour2.0. In xHarbour there are also HB_COMPRESS() and HB_UNCOMPRESS() functions. They are wrappers to ZLIB library and available in Harbour in xHarbour compatibility library (xhb.lib). To use them you need to specify -lxhb HBMK2 switch but I strongly suggest to use native Harbour ZLIB API which has much cleaner interface (HB_ZCOMPRESS()/HB_ZUNCOMPRESS()) > - hbmk2 say : > ...lib/libhbct.a(charop.o):charop.c:(.text+0xa40): multiple definition of > `HB_FUN_CHARXOR' > ...lib/libcrypt.a(c_crypt.o):c_crypt.c:(.text+0x0): first defined here Sorry but libcrypt.a is not part of Harbour. I do not know where did you take this library from and what it does but it tries creates name conflict with CHARXOR() function in HBCT library. You should contact with this library author and ask about the fix. > - Harbour give "4" for expression : > LEN( W2BIN( BIN2W( 2^10 ) ) ) ) > According to a Harbour.chm, W2BIN() return a two bytes character string. > AFAIK "W" stand for "word" and word is "16 bit encoded unsigned short > integer"; does I'm wrong? You are right. It's typo in W2BIN() in HBXPP (xbase++ compatible) library. I'll fix it ASAP. Thanks for the info. best regards, Przemek _______________________________________________ Harbour-users mailing list (attachment size limit: 40KB) Harbour-users@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour-users