Platforms to show: All Mac Windows Linux Cross-Platform
Compression
Functions for compressing and decompressing.
- Globals
- CompressBZip2MBS(buf as string,level as Integer) as string
- CompressLZWMBS(buf as string) as string
- CompressZLibMBS(Buffer as string, level as Integer = 9) as string
- CompressZLibMBS(Buffer as string, level as Integer, byref error as Integer) as string
- DecompressBZip2MBS(buf as string,size as Integer) as string
- DecompressLZWMBS(buf as string, size as Integer) as string
- DecompressZLibMBS(Buffer as string, size as Integer = 0) as string
- DecompressZLibMBS(Buffer as string, size as Integer, byref error as Integer) as string
- Classes
- class BZip2CompressMBS
- method Close
- method Constructor(BufferPtr as Ptr, BufferSize as Integer)
- method Constructor(BufferSize as Integer=20000)
- method EndZip
- method GetOutput as string
- method InitZip(level as Integer)
- method InputAvail as Integer
- method OutputSize as Integer
- method ProcessZip(Flush as boolean=false)
- method SetInput(data as Memoryblock) as boolean
- method SetInput(data as ptr, Size as Integer) as boolean
- method SetInput(data as string) as boolean
- property Error as Integer
- property OutputBufferSize as Integer
- property OutputPtr as Ptr
- property OutputUsedSize as Integer
- property TotalInput as UInt64
- property TotalOutput as UInt64
- property Version as String
- class BZip2DecompressMBS
- method Close
- method Constructor(BufferPtr as Ptr, BufferSize as Integer)
- method Constructor(BufferSize as Integer=20000)
- method EndZip
- method GetOutput as string
- method InitZip
- method InputAvail as Integer
- method OutputSize as Integer
- method ProcessZip
- method SetInput(data as Memoryblock) as boolean
- method SetInput(data as ptr, Size as Integer) as boolean
- method SetInput(data as string) as boolean
- property Error as Integer
- property OutputBufferSize as Integer
- property OutputPtr as Ptr
- property OutputUsedSize as Integer
- property TotalInput as UInt64
- property TotalOutput as UInt64
- property Version as String
- class BZip2FileMBS
- method Close
- method Flush
- method Open(file as folderitem, mode as string) as boolean
- method OpenString(data as string) as boolean
- method Read(ByteCount as Int64) as string
- method ReadByte as integer
- method ReadData(ByteCount as Int64) as Memoryblock
- method Write(data as Memoryblock)
- method Write(data as string)
- method WriteByte(data as integer)
- property Handle as Integer
- property Lasterror as Integer
- property LasterrorMessage as String
- property Version as String
- class GZipFileMBS
- method Adler32(start as UInt32, data as string) as UInt32
- method Close
- method CloseForString as string
- method CRC32(start as UInt32, data as string) as UInt32
- method CreateForString as boolean
- method Flush(flush as Integer)
- method Open(file as folderitem, mode as string) as boolean
- method OpenString(data as string) as boolean
- method Read(ByteCount as Int64) as string
- method ReadByte as Integer
- method ReadData(ByteCount as Int64) as Memoryblock
- method Rewind
- method SetParameter(level as Integer, strategy as Integer)
- method Write(data as Memoryblock)
- method Write(data as string)
- method WriteByte(data as Integer)
- property Direct as Boolean
- property EOF as Boolean
- property ErrorCode as Integer
- property ErrorMessage as String
- property Handle as Integer
- property Lasterror as Integer
- property Position as Integer
- property Version as String
- class UnZipFileInfoMBS
- property CompressedSize as UInt64
- property CompressionMethod as UInt32
- property CRC as UInt32
- property Date as Date
- property Day as Integer
- property DiskNumStart as UInt32
- property DosDate as UInt32
- property ExternalFileAttributes as UInt32
- property Flag as UInt32
- property Hour as Integer
- property InternalFileAttributes as UInt32
- property Minute as Integer
- property Month as Integer
- property Second as Integer
- property SizeFileComment as UInt32
- property SizeFileExtra as UInt32
- property SizeFilename as UInt32
- property UncompressedSize as UInt64
- property Version as UInt32
- property VersionNeeded as UInt32
- property Year as Integer
- class UnZipFilePositionMBS
- property NumberOfFile as UInt64
- property PositionInZipDirectory as UInt64
- class UnZipMBS
- method Close
- method CloseCurrentFile
- method Comment as string
- method CommentSize as UInt32
- shared method CompareFileNames(filename1 as string, filename2 as string, CaseSensitive as Integer) as Integer
- method Constructor(data as memoryblock)
- method Constructor(data as string)
- method Constructor(file as folderitem)
- method Constructor(file as folderitem, Offset as Integer)
- method Count as UInt64
- method EOF as Integer
- method ExtractFiles(DestFolder as FolderItem, ExtractWithoutPath as boolean = false, Overwrite as Boolean = false, Password as String = "", byref ErrorMessage as String) as boolean
- method FileInfo as UnZipFileInfoMBS
- method FileName as string
- method GetLocalExtrafield as string
- method GoToFirstFile
- method GoToNextFile
- method LocateFile(filename as string, CaseSensitive as Integer)
- method OpenCurrentFile
- method OpenCurrentFile(byref method as Integer, byref level as Integer, raw as boolean)
- method OpenCurrentFile(byref method as Integer, byref level as Integer, raw as boolean, password as string)
- method OpenCurrentFile(password as string)
- method Position as UInt64
- method Position2 as UInt64
- method ReadCurrentFile(size as Integer) as string
- property Handle as Integer
- property Lasterror as Integer
- property FilePosition as UnZipFilePositionMBS
- property Offset as UInt64
- class ZipFileInfoMBS
- method SetDate(d as date)
- method SetDateTime(d as dateTime)
- property Day as Integer
- property DosDate as UInt32
- property ExternalFileAttributes as UInt32
- property Hour as Integer
- property InternalFileAttributes as UInt32
- property Minute as Integer
- property Month as Integer
- property Second as Integer
- property Year as Integer
- class ZipMBS
- method Close(GlobalComment as string="")
- method CloseFile
- method CloseFileRaw(UncompressedSize as Integer, CRC32 as Integer)
- shared method CompressFiles(ZipFile as FolderItem, SourceFolder as FolderItem, files() as string, Overwrite as Integer = 0, Password as string = "", CompressionLevel as Integer = 9, byref ErrorMessage as string) as Integer
- method Constructor(file as folderitem, append as Integer = 0)
- method CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string = "", ExtraGlobal as string = "", Comment as String = "", CompressionMethod as Integer = 8, Level as Integer = 9, Zip64 as boolean = false)
- method CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean)
- method CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean, WindowBits as Integer, MemLevel as Integer, Strategy as Integer, Password as string, crcForCtypting as UInt32)
- method CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean, WindowBits as Integer, MemLevel as Integer, Strategy as Integer, Password as string, crcForCtypting as UInt32, versionMadeBy as UInt32, flagBase as UInt32)
- method Write(data as string)
- property Handle as Integer
- property Lasterror as Integer
- class ZLibCompressMBS
- method Adler32(start as UInt32, data as string) as UInt32
- method close
- method Constructor(BufferPtr as Ptr, BufferSize as Integer)
- method Constructor(BufferSize as Integer=20000)
- method CRC32(start as UInt32, data as string) as UInt32
- method EndZip
- method GetOutput as string
- method InitZip(level as Integer)
- method InputAvail as Integer
- method OutputSize as Integer
- method ProcessFinish
- method ProcessZip(Flush as boolean=false)
- method SetInput(data as MemoryBlock) as boolean
- method SetInput(data as ptr, Size as Integer) as boolean
- method SetInput(data as string) as boolean
- property CRC as UInt32
- property Error as Integer
- property ErrorMessage as String
- property OutputBufferSize as Integer
- property OutputPtr as Ptr
- property OutputUsedSize as Integer
- property TotalInput as Integer
- property TotalOutput as Integer
- property Version as String
- class ZLibDecompressMBS
- method Adler32(start as UInt32, data as string) as UInt32
- method close
- method Constructor(BufferPtr as Ptr, BufferSize as Integer)
- method Constructor(BufferSize as Integer=20000)
- method CRC32(start as UInt32, data as string) as UInt32
- method EndZip
- method GetOutput as string
- method InitZip
- method InputAvail as Integer
- method OutputSize as Integer
- method ProcessZip(Flush as boolean=false)
- method SetInput(data as Memoryblock) as boolean
- method SetInput(data as ptr, Size as Integer) as boolean
- method SetInput(data as string) as boolean
- property CRC as UInt32
- property Error as Integer
- property ErrorMessage as String
- property OutputBufferSize as Integer
- property OutputPtr as Ptr
- property OutputUsedSize as Integer
- property TotalInput as Integer
- property TotalOutput as Integer
- property Version as String
- class ZStdMBS
- shared method Compress(Data as MemoryBlock, CompressionLevel as Integer = 1) as MemoryBlock
- shared method Compress(Data as String, CompressionLevel as Integer = 1) as String
- shared method Decompress(Data as MemoryBlock) as MemoryBlock
- shared method Decompress(Data as String) as String
- class BZip2CompressMBS
- Modules
- module LZ4MBS
- method Compress(InputData as MemoryBlock) as MemoryBlock
- method Compress(InputData as Ptr, Size as Integer) as MemoryBlock
- method Compress(InputData as string) as string
- method CompressFast(InputData as MemoryBlock, Acceleration as Integer = 1) as MemoryBlock
- method CompressFast(InputData as Ptr, Size as Integer, Acceleration as Integer = 1) as MemoryBlock
- method CompressFast(InputData as string, Acceleration as Integer = 1) as string
- method CompressHC(InputData as MemoryBlock, compressionLevel as Integer = 9) as MemoryBlock
- method CompressHC(InputData as Ptr, Size as Integer, compressionLevel as Integer = 9) as MemoryBlock
- method CompressHC(InputData as string, compressionLevel as Integer = 9) as string
- method Decompress(CompressedData as MemoryBlock, UncompressedSize as Integer = 0) as MemoryBlock
- method Decompress(CompressedData as Ptr, Size as Integer, UncompressedSize as Integer = 0) as MemoryBlock
- method Decompress(CompressedData as string, UncompressedSize as Integer = 0) as string
- method LibVersion as string
- const AccelerationDefault = 1
- const MaxInputSize = &h7E000000
- module PackbitsMBS
- method Compress(data as MemoryBlock) as MemoryBlock
- method Compress(data as string) as string
- method Compress(InputFile as FolderItem, OutputFile as FolderItem) as boolean
- method Decompress(data as MemoryBlock) as MemoryBlock
- method Decompress(data as string) as string
- method Decompress(InputFile as FolderItem, OutputFile as FolderItem) as boolean
- module LZ4MBS
Release notes
- Version 24.3
- Added OutputUsedSize and OutputPtr properties and a new Constructor to BZip2CompressMBS, ZLibDecompressMBS, BZip2DecompressMBS and ZLibDecompressMBS classes.
- Added SetInput method taking ptr to ZLibDecompressMBS, ZLibCompressMBS, BZip2DecompressMBS and BZip2CompressMBS classes.
- Version 23.5
- Fixed a problem with PackBitsMBS not working properly for Linux ARM 64-bit.
- Version 22.2
- Added ZStdMBS class to compress/decompress with ZStandard compression.
- Version 21.1
- Fixed an issue with LZ4MBS decompression failing.
- Version 21.0
- Fixed problem with ReadCurrentFile function in UnZipMBS class not setting LastError property correctly.
- Version 19.5
- Added CompressFast and CompressHC methods to LZ4MBS module and new constants.
- Version 19.4
- Added LZ4MBS module.
- Version 18.5
- Changed DecompressZLibMBS to auto detect the size of output data.
- Version 18.3
- Added more methods for GZipFileMBS and improved error handling.
- Fixed GZipFileMBS.Read bug for 64bit.
The items on this page are in the following plugins: MBS Compression Plugin.
