MBS Xojo Encryption Kit 1.0
ZipMB Module:
Module ZipMB
Const kEndOfStream = 1
Const kErrorBuffer = -5
Const kErrorData = -3
Const kErrorOK = 0
Const kErrorOutOfMemory = -4
Const 1/0 = libz.dylib
Const 9/0 = /usr/lib/libz.dylib
Const 2/0 = libz.dll
Const 5/0 = libz.so
Const kLibrary =
Protected Function Compress(Data as MemoryBlock) As MemoryBlock
// Compresses the source buffer into the destination buffer.
//
// As you see we always use best compression and calculate buffer size with compressBound
//
// compress returns kErrorOK if success, kErrorOutOfMemory if there was not
// enough memory, kErrorBuffer if there was not enough room in the output
// buffer. (should never happen)
End
Protected Function Compress(t as string) As MemoryBlock
// convert string in current encoding to MemoryBlock
End
Protected Function Compress(t as text) As xojo.Core.MemoryBlock
End
Protected Function Compress(Data as xojo.Core.MemoryBlock) As xojo.Core.MemoryBlock
// Compresses the source buffer into the destination buffer.
//
// As you see we always use best compression and calculate buffer size with compressBound
//
// compress returns kErrorOK if success, kErrorOutOfMemory if there was not
// enough memory, kErrorBuffer if there was not enough room in the output
// buffer. (should never happen)
End
Protected Function Decompress(Data as MemoryBlock) As string
// decompress data and return new MemoryBlock
End
Protected Function Decompress(Data as xojo.Core.MemoryBlock) As xojo.Core.MemoryBlock
// decompress data and return new MemoryBlock
End
Protected Sub test()
End
End Module
