I try as partial reply post a prev mail to mailing by Przemek ------------- You can make anything what you want with .hrb files body. You only have to decode it before you will call HB_HRBLOAD( <cHrbBody> ), f.e. you can use this function to compress and encrypt .hrb files:
proc encode_hrb( cKey ) local cHrbBody, file for each file in directory( "*.hrb" ) cHrbBody := hb_memoread( file[ 1 ] ) if !empty( cHrbBody ) cHrbBody := hb_zcompress( cHrbBody ) cHrbBody := sx_encrypt( cHrbBody, cKey ) hb_memowrit( file[ 1 ] + "enc", cHrbBody ) endif next return and this one to load such files: proc load_hrb( cKey, cFile, /* init function parameters*/ ... ) local cHrbBody cHrbBody := hb_memoread( cFile ) cHrbBody := sx_decrypt( cHrbBody, cKey ) cHrbBody := hb_zuncompress( cHrbBody ) hb_hrbLoad( cHrbBody, ... ) return In both functions <cKey> is used as encryption key. It's not strong encryption but for simple string hiding should be enough. best regards, Przemek 2010/5/31 Bicahi Esgici <esg...@gmail.com>: > Hi All > > - 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 ... ) ) > > - 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 > > - 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? > > Regards > > -- > > Esgici > _______________________________________________ > Harbour-users mailing list (attachment size limit: 40KB) > Harbour-users@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour-users > -- Massimo Belgrano _______________________________________________ Harbour-users mailing list (attachment size limit: 40KB) Harbour-users@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour-users