Parasol Framework
  • Gallery
  • API
  • Wiki
  • GitHub
    • Audio
    • Core
    • Display
    • Fluid
    • Font
    • Network
    • Vector
    • Audio
    • Sound
    • File
    • MetaClass
    • Module
    • StorageDevice
    • Task
    • Thread
    • Time
    • Compression
    • Config
    • Script
    • XML
    • Controller
    • BlurFX
    • ColourFX
    • CompositeFX
    • ConvolveFX
    • DisplacementFX
    • FilterEffect
    • FloodFX
    • ImageFX
    • LightingFX
    • MergeFX
    • MorphologyFX
    • OffsetFX
    • RemapFX
    • SourceFX
    • TurbulenceFX
    • WaveFunctionFX
    • Scintilla
    • ScintillaSearch
    • Bitmap
    • Clipboard
    • Display
    • Document
    • Font
    • Picture
    • Pointer
    • Surface
    • SVG
    • ClientSocket
    • HTTP
    • NetSocket
    • Proxy
    • Vector
    • VectorClip
    • VectorColour
    • VectorEllipse
    • VectorFilter
    • VectorGradient
    • VectorGroup
    • VectorImage
    • VectorPath
    • VectorPattern
    • VectorPolygon
    • VectorRectangle
    • VectorScene
    • VectorShape
    • VectorSpiral
    • VectorText
    • VectorTransition
    • VectorViewport
    • VectorWave

CompressedStream Class

Acts as a proxy for decompressing and compressing data streams between objects.

Use the CompressedStream class to compress and decompress data on the fly without the need for a temporary storage area. The default compression algorithm is DEFLATE with gzip header data. It is compatible with common command-line tools such as gzip.

To decompress data, set the Input field with a source object that supports the Read() action, such as a File. Repeatedly reading from the CompressedStream will automatically handle the decompression process. If the decompressed size of the incoming data is defined in the source header, it will be reflected in the Size field.

To compress data, set the Output field with a source object that supports the Write() action, such as a File. Repeatedly writing to the CompressedStream with raw data will automatically handle the compression process for you. Once all of the data has been written, call the Write() action with a Buffer of NULL and Length -1 to signal an end to the streaming process.

Structure

The CompressedStream class consists of the following fields:

Access
NameTypeComment
  FormatCFThe format of the compressed stream. The default is GZIP.
NameDescription
CF::DEFLATEThe 'deflate' format
CF::GZIPThe 'gzip' format
CF::ZLIBThe 'zlib' format
  InputOBJECTPTRAn input object that will supply data for decompression.

To create a stream that decompresses data from a compressed source, set the Input field with a reference to an object that will provide the source data. It is most common for the source object to be a File type, however any class that supports the Read() action is permitted.

The source object must be in a readable state. The Input field is mutually exclusive to the Output field.

  OutputOBJECTPTRA target object that will receive data compressed by the stream.

To create a stream that compresses data to a target object, set the Output field with an object reference. It is most common for the target object to be a File type, however any class that supports the Write() action is permitted.

The target object must be in a writeable state. The Output field is mutually exclusive to the Input field.

  SizeINT64The uncompressed size of the input source, if known.

The Size field will reflect the uncompressed size of the input source, if this can be determined from the header. In the case of GZIP decompression, the size will not be known until the parser has consumed the header. This means that at least one call to the Read() action is required before the Size is known.

If the size is unknown, a value of -1 is returned.

  TotalOutputINT64A live counter of total bytes that have been output by the stream.
CompressedStream class documentation © Paul Manias 1996-2025

AC Type

Action identifiers.

NameDescription
AC::Activate
AC::Clear
AC::Clipboard
AC::CopyData
AC::DataFeed
AC::Deactivate
AC::Disable
AC::DragDrop
AC::Draw
AC::END
AC::Enable
AC::Flush
AC::Focus
AC::Free
AC::FreeWarning
AC::GetKey
AC::Hide
AC::Init
AC::Lock
AC::LostFocus
AC::Move
AC::MoveToBack
AC::MoveToFront
AC::MoveToPoint
AC::NewChild
AC::NewObject
AC::NewOwner
AC::NewPlacement
AC::Next
AC::Prev
AC::Query
AC::Read
AC::Redimension
AC::Redo
AC::Refresh
AC::Rename
AC::Reset
AC::Resize
AC::SaveImage
AC::SaveSettings
AC::SaveToObject
AC::Seek
AC::SetField
AC::SetKey
AC::Show
AC::Signal
AC::Undo
AC::Unlock
AC::Write
CompressedStream module documentation © Paul Manias 1996-2025

CF Type

Compression stream formats

NameDescription
CF::DEFLATEThe 'deflate' format
CF::GZIPThe 'gzip' format
CF::ZLIBThe 'zlib' format
CompressedStream module documentation © Paul Manias 1996-2025

EVG Type

Event categories.

NameDescription
EVG::ANDROIDAndroid specific events that do not already fit existing categories.
EVG::APPCustom event dispatched from an application
EVG::AUDIOAudio system events.
EVG::CLASSCustom event dispatched from a class that doesn't fit within the rest of the event framework
EVG::DISPLAYVideo display events.
EVG::FILESYSTEMFile system events.
EVG::GUIEvents generated by the Graphical User Interface.
EVG::HARDWAREHardware device events that are not covered by other types.
EVG::IOInput/Output events.
EVG::NETWORKNetwork events.
EVG::POWERPower Management - can also include app-specific events relating to resource management.
EVG::SYSTEMSystem-wide events
EVG::USERUser activity events (such as user login).
CompressedStream module documentation © Paul Manias 1996-2025

FOF Type

Flags that can be passed to FindObject()

NameDescription
FOF::SMART_NAMESParse numeric object names as ID references and support use of the 'Owner' reserved keyword.
CompressedStream module documentation © Paul Manias 1996-2025

IDTYPE Type

Types for AllocateID()

NameDescription
IDTYPE::FUNCTIONFunction ID's are used to track FUNCTION types and are assigned to the function ID field.
IDTYPE::GLOBALGlobal ID's have no specific association with anything.
IDTYPE::MESSAGEMessage ID's are allocated for the purpose of sending uniquely identifiable messages between tasks.
CompressedStream module documentation © Paul Manias 1996-2025

LDF Type

Flags for LoadFile()

NameDescription
LDF::CHECK_EXISTSLimits the routine to checking the file cache for the existence of the file. If found, the relevant cache entry is returned. The open count is not incremented by this action (it is therefore unnecessary to follow-up with a call to UnloadFile()). If no up-to-date cache entry is available, ERR::Search is returned.
CompressedStream module documentation © Paul Manias 1996-2025

LOC Type

AnalysePath() values

NameDescription
LOC::DIRECTORYThe path refers to a folder.
LOC::FILEThe path refers to a file.
LOC::VOLUMEThe path refers to a volume name.
CompressedStream module documentation © Paul Manias 1996-2025

MEM Type

Memory types used by AllocMemory(). The lower 16 bits are stored with allocated blocks, the upper 16 bits are function-relative only.

NameDescription
MEM::AUDIOThe memory space is reserved by an audio device such as a sound card.
MEM::CALLERThis flag is usable only in routines that are supporting a class method. It forces the memory allocation to be tracked to the object that made the method call. This is particularly important in methods that return memory blocks that do not form a part of the object itself.
MEM::CODESet if the memory will contain executable program code.
MEM::DATAThe default type, DATA, is used to indicate a standard memory allocation from system RAM.
MEM::HIDDENHidden blocks are not recorded and are excluded from resource tracking.
MEM::MANAGEDEnables custom resource management for the memory block. The start of the block will need to be reserved with a pointer to a ResourceManager structure, which is included as part of the block's declared Size. The Free() callback will be called when the block is removed.
MEM::NO_BLOCKPermanently turn off all accesses to this memory block. This means that multiple threads can have full read/write access to the memory block at once regardless of other acces flags.
MEM::NO_BLOCKINGPermanently turn off all accesses to this memory block. This means that multiple threads can have full read/write access to the memory block at once regardless of other acces flags.
MEM::NO_CLEARDo not clear the memory on allocation (saves time).
MEM::NO_LOCKFor AllocMemory() only, indicates that the (private) memory block should not be locked on return.
MEM::NO_POOLGives a hint to the allocator to allocate the block outside of the memory pool.
MEM::READThe memory is explicitly marked as readable.
MEM::READ_WRITESynonym for READ | WRITE
MEM::STRINGIdentifies the memory content as a null terminated string. Useful for debugging and run-time type identification in scripts.
MEM::TEXTUREThe memory space is reserved by a video driver for hosting texture graphics.
MEM::TMP_LOCKEnables temporary locking restrictions. Prevents processes from sleeping while holding a lock on the memory block.
MEM::UNTRACKEDAllocating an untracked memory block will prevent the memory block from being tracked back to the object holding the current context.
MEM::VIDEOThe memory space is reserved by a video device such as a graphics card for display purposes, e.g. framebuffer.
MEM::WRITEThe memory is explicitly marked as writeable.
CompressedStream module documentation © Paul Manias 1996-2025

MSF Type

Message flags.

NameDescription
MSF::ADDThe default behaviour - this will add the message to the end of the queue.
MSF::MESSAGE_IDThe Type parameter refers to a unique message ID rather than a message type for this call.
MSF::NO_DUPLICATEIf the Type parameter matches a message already inside the queue, the new message will not be added and the function will immediately return with ERR::Okay.
MSF::UPDATEIf the Type parameter matches a message already inside the queue, the data for that message will be deleted, then the new message will be added to the end of the queue.
MSF::WAITWait before inserting the message if the queue is at maximum capacity.
CompressedStream module documentation © Paul Manias 1996-2025

MSGID Type

Reserved message ID's that are handled internally.

NameDescription
MSGID::ACTION
MSGID::BREAK
MSGID::COMMAND
MSGID::CORE_END
MSGID::DEBUG
MSGID::EVENT
MSGID::FREE
MSGID::QUIT
MSGID::THREAD_ACTION
MSGID::THREAD_CALLBACK
MSGID::VALIDATE_PROCESS
MSGID::WAIT_FOR_OBJECTS
CompressedStream module documentation © Paul Manias 1996-2025

NF Type

Flags that can be passed to NewObject(). If a flag needs to be stored with the object, it must be specified in the lower word.

NameDescription
NF::COLLECTMarked for garbage collection.
NF::FREERead-only indicator for when the object is being freed.
NF::FREE_ON_UNLOCKRead-only indicator for when the object is marked for deletion.
NF::INITIALISEDRead-only indicator if the object has been initialised.
NF::LOCALClasses can allocate local objects to stop them from being associated with the client.
NF::MESSAGEAction has been called against the object through the message system (managed by ProcessMessages()).
NF::NAMEUse the Name parameter to name the created object. This flag is not required if using UNIQUE.
NF::PRIVATE
NF::RECLASSEDThe object switched from the base-class to a sub-class during initialisation.
NF::SIGNALLEDThe object has been signalled and is awaiting processing.
NF::TIMER_SUBThe object is subscribed to a timer interval.
NF::UNIQUEUse to allocate an object that has a guaranteed unique name. This will prevent code from shadowing any object that exists with the same name, which can be imperative when creating shared objects. If it is discovered that an identically named object exists, NewObject() will return ERR::ObjectExists. This flag works in conjunction with the Name parameter.
NF::UNTRACKEDAn object created with this flag will not be tracked back to the object that created it.
CompressedStream module documentation © Paul Manias 1996-2025

PERMIT Type

Permission flags

NameDescription
PERMIT::ALL_DELETESynonym for EVERYONE_DELETE
PERMIT::ALL_EXECSynonym for EVERYONE_EXEC
PERMIT::ALL_READSynonym for EVERYONE_READ
PERMIT::ALL_WRITESynonym for EVERYONE_WRITE
PERMIT::ARCHIVEMarks the file for future backup. The flag should be cleared after the backup has succeeded.
PERMIT::DELETEOwner can delete. If the file system does not support this, deletion is enabled via the WRITE flag.
PERMIT::EVERYONE_ACCESSSynonym for EVERYONE_READ | EVERYONE_WRITE | EVERYONE_EXEC | EVERYONE_DELETE
PERMIT::EVERYONE_DELETESynonym for DELETE | GROUP_DELETE | OTHERS_DELETE
PERMIT::EVERYONE_EXECSynonym for EXEC | GROUP_EXEC | OTHERS_EXEC
PERMIT::EVERYONE_READSynonym for READ | GROUP_READ | OTHERS_READ
PERMIT::EVERYONE_READWRITESynonym for EVERYONE_READ | EVERYONE_WRITE
PERMIT::EVERYONE_WRITESynonym for WRITE | GROUP_WRITE | OTHERS_WRITE
PERMIT::EXECUser/Owner can execute.
PERMIT::GROUPSynonym for GROUP_READ | GROUP_WRITE | GROUP_EXEC | GROUP_DELETE
PERMIT::GROUPIDAllows executables to run with a set group id.
PERMIT::GROUP_DELETEGroup members can delete.
PERMIT::GROUP_EXECGroup members can execute.
PERMIT::GROUP_READGroup members can read.
PERMIT::GROUP_WRITEGroup members can write.
PERMIT::HIDDENRecommends that the file is hidden from view by default.
PERMIT::INHERITInherit permissions from parent folder and logical OR them with preset permission flags.
PERMIT::NETWORKFile is hosted on another machine.
PERMIT::OFFLINEFile content for this networked file has not been cached on the local PC.
PERMIT::OTHERSSynonym for OTHERS_READ | OTHERS_WRITE | OTHERS_EXEC | OTHERS_DELETE
PERMIT::OTHERS_DELETEOthers can delete.
PERMIT::OTHERS_EXECOthers can execute.
PERMIT::OTHERS_READOthers can read.
PERMIT::OTHERS_WRITEOthers can write.
PERMIT::PASSWORDFile is password protected.
PERMIT::READUser/Owner has read access. This will not allow compiled code to be executed.
PERMIT::USERSynonym for READ | WRITE | EXEC | DELETE
PERMIT::USERIDAllows executables to run with a set user id.
PERMIT::USER_EXECSynonym for EXEC
PERMIT::USER_READSynonym for READ
PERMIT::USER_WRITESynonym for WRITE
PERMIT::WRITEUser/Owner can write.
CompressedStream module documentation © Paul Manias 1996-2025

PMF Type

Flags for ProcessMessages

NameDescription
CompressedStream module documentation © Paul Manias 1996-2025

RDF Type

Flags for the OpenDir() function.

NameDescription
RDF::ARCHIVEFeedback only - archive bit is set.
RDF::DATERetrieve the date stamp of each file.
RDF::FILERead all files in the folder.
RDF::FILESRead all files in the folder.
RDF::FOLDERRead all folders/volumes in the folder.
RDF::FOLDERSRead all folders/volumes in the folder.
RDF::HIDDENFeedback only - file/folder is hidden.
RDF::LINKFeedback only - file/folder is actually a link to another location.
RDF::PERMISSIONSGet permission/security information.
RDF::QUALIFIEDReturn fully qualified folder names (i.e. trailing slash or colon for each name).
RDF::QUALIFYReturn fully qualified folder names (i.e. trailing slash or colon for each name).
RDF::READ_ALLSynonym for SIZE | DATE | PERMISSIONS | FILES | FOLDERS
RDF::READ_ONLYRead-only (not permissions related and might indicate read-only media).
RDF::SIZERetrieve the byte size of each file.
RDF::STREAMPath is connected via a stream, e.g. network connection.
RDF::TAGSReceive additional information for each file, such as comments, author and copyright. The results are stored in the Tags field of each file.
RDF::TIMERetrieve the date stamp of each file.
RDF::VIRTUALPath is to a virtual device.
RDF::VOLUMEFeedback only - indicates a volume.
CompressedStream module documentation © Paul Manias 1996-2025

RES Type

NameDescription
RES::CORE_IDLRefers to the Core module's compressed IDL string.
RES::CPU_SPEEDThe average top-speed of all CPU cores in Mhz.
RES::FREE_MEMORYThe total amount of free memory.
RES::FREE_SWAPThe total amount of free swap memory.
RES::JNI_ENVReturn the current JNI environment string.
RES::KEY_STATEMaintains the state of key qualifiers such as caps-lock and the shift keys.
RES::LOG_DEPTHThe current depth of log messages.
RES::LOG_LEVELThe current level of log detail (larger numbers indicate more detail).
RES::MAX_PROCESSESThe maximum number of processes that can be supported at any time.
RES::OPEN_INFOPointer to the OpenInfo structure originally used to initialise the system.
RES::PRIVILEGEDThis is set to true if the process has elevated privileges (such as superuser or administrative rights).
RES::PRIVILEGED_USERIf this value is set to 1, the process will operate in privileged mode (typically this enables full administrator rights). This feature will only work for Unix processes that are granted admin rights when launched. Setting the Value to 0 reverts to the user's permission settings. SetResource() will return an error code indicating the level of success.
RES::PROCESS_STATELife-cycle stage of the running process
RES::STATIC_BUILDReturns true if the runtime is a statically linked build.
RES::THREAD_IDReturn the ID of the current thread.
RES::TOTAL_MEMORYThe total amount of installed memory.
RES::TOTAL_SHARED_MEMORYThe total amount of shared memory in use (system wide).
RES::TOTAL_SWAPThe total amount of available swap space.
CompressedStream module documentation © Paul Manias 1996-2025

RFD Type

Flags for RegisterFD()

NameDescription
RFD::ALWAYS_CALLAlways call this FD's handler prior to the process going to sleep.
RFD::EXCEPTActivate the callback if error conditions are pending.
RFD::READActivate the callback if there is data available to read.
RFD::RECALLSet if the subscriber needs to manually check for incoming/outgoing data. This is supported as a one-off check, so the flag will be disabled automatically when the subscriber is called.
RFD::REMOVEStop monitoring this file descriptor.
RFD::SOCKETIdentifies the file descriptor as a socket (Linux systems only).
RFD::WRITEActivate the callback if there is room to write to the FD's buffer.
CompressedStream module documentation © Paul Manias 1996-2025

RP Type

Path types for SetResourcePath()

NameDescription
RP::MODULE_PATHAn alternative path leading to the system modules (normally system:modules/). Introduced for platforms such as Android, where modules are stored in asset folders.
RP::ROOT_PATHOverrides the root path, which defaults to the location at which Parasol is installed.
RP::SYSTEM_PATHThe path of the system: volume, which otherwise defaults to [root]:system/.
CompressedStream module documentation © Paul Manias 1996-2025

RSF Type

Flags for ResolvePath()

NameDescription
RSF::APPROXIMATEIgnores file extensions for the purpose of file name matching.
RSF::CASE_SENSITIVEFor use on host systems that use case-insensitive file systems such as Windows; this option checks that the discovered file is a case-sensitive match to the Path.
RSF::CHECK_VIRTUALIf the volume referenced by Path is traced to another volume that is reserved by a virtual file system driver, ERR::VirtualVolume is returned. The volume is still resolved as far as possible and the resulting path will be returned by this function.
RSF::NO_DEEP_SCANDo not perform more than one iteration when resolving the source file path.
RSF::NO_FILE_CHECKDo not test for the existence of the targeted file or folder during the resolution process.
RSF::PATHUse the PATH environment variable to resolve the file name in the Path parameter.
CompressedStream module documentation © Paul Manias 1996-2025

VLF Type

VlogF flags

NameDescription
VLF::API
VLF::BRANCH
VLF::CRITICAL
VLF::DETAIL
VLF::ERROR
VLF::FUNCTION
VLF::INFO
VLF::TRACE
VLF::WARNING
CompressedStream module documentation © Paul Manias 1996-2025

VOLUME Type

Options for SetVolume()

NameDescription
VOLUME::HIDDENHides the volume so that it will not show up when reading volumes from the root path :.
VOLUME::PRIORITYIf the volume already exists, the path will be inserted at the beginning of the path list so that it has priority over the others.
VOLUME::REPLACEIf the volume already exists, all paths that are attached to it will be replaced with the new path setting.
VOLUME::SYSTEMIdentifies the volume as being created by the system (this flag is not for client use).
CompressedStream module documentation © Paul Manias 1996-2025

ActionTable Structure

Structure for ActionList

FieldTypeDescription
HashUINTHash of the action name.
SizeINTByte-size of the structure for this action.
NameCSTRINGName of the action.
Argsconst struct FunctionField *List of fields that are passed to this action.
CompressedStream class documentation © Paul Manias 1996-2025

ChildEntry Structure

Structure for ListChildren() function

FieldTypeDescription
ObjectIDOBJECTIDObject ID
ClassIDCLASSIDThe class ID of the referenced object.
CompressedStream class documentation © Paul Manias 1996-2025

DirInfo Structure

Used by OpenDir() only

FieldTypeDescription
Infostruct FileInfo *Pointer to a FileInfo structure
CompressedStream class documentation © Paul Manias 1996-2025

Field Structure

Used to describe the public fields of a class.

FieldTypeDescription
ArgMAXINTAn option to complement the field type. Can be a pointer or an integer value
GetValueFUNCTION *A virtual function that will retrieve the value for this field.
SetValueAPTRA virtual function that will set the value for this field.
WriteValueFUNCTION *An internal function for writing to this field.
NameCSTRINGThe English name for the field, e.g. Width
FieldIDUINTProvides a fast way of finding fields, e.g. FID_Width
OffsetUINT16Field offset within the object
IndexUINT16Field array index
FlagsUINTSpecial flags that describe the field
CompressedStream class documentation © Paul Manias 1996-2025

FileInfo Structure

Metadata for describing a file.

FieldTypeDescription
SizeINT64The size of the file's content.
TimeStampINT6464-bit time stamp - usable only for comparison (e.g. sorting).
Nextstruct FileInfo *Next structure in the list, or NULL.
NameSTRINGThe name of the file.
FlagsRDFAdditional flags to describe the file.
PermissionsPERMITStandard permission flags.
UserIDINTUser ID (Unix systems only).
GroupIDINTGroup ID (Unix systems only).
Createdstruct DateTimeThe date/time of the file's creation.
Modifiedstruct DateTimeThe date/time of the last file modification.
CompressedStream class documentation © Paul Manias 1996-2025

MemInfo Structure

FieldTypeDescription
StartAPTRThe starting address of the memory block (does not apply to shared blocks).
ObjectIDOBJECTIDThe object that owns the memory block.
SizeUINTThe size of the memory block.
FlagsMEMThe type of memory.
MemoryIDMEMORYIDThe unique ID for this block.
AccessCountINT16Total number of active locks on this block.
CompressedStream class documentation © Paul Manias 1996-2025

Message Structure

Message header.

FieldTypeDescription
TimeINT64A timestamp acquired from PreciseTime() when the message was first passed to SendMessage().
UIDINTA unique identifier automatically created by SendMessage().
TypeMSGIDA message type identifier as defined by the client.
SizeINTThe byte-size of the message data, or zero if no data is provided.
CompressedStream class documentation © Paul Manias 1996-2025

ObjectSignal Structure

Required in calls to WaitForObjects().

FieldTypeDescription
ObjectOBJECTPTRReference to an object to monitor.
CompressedStream class documentation © Paul Manias 1996-2025

SystemState Structure

Returned by the GetSystemState() function.

FieldTypeDescription
PlatformCSTRINGString-based field indicating the user's platform. Currently returns Native, Windows, OSX or Linux.
ConsoleFDHOSTHANDLEInternal
StageINTThe current operating stage. -1 = Initialising, 0 indicates normal operating status; 1 means that the program is shutting down; 2 indicates a program restart; 3 is for mode switches.
CompressedStream class documentation © Paul Manias 1996-2025