Data Structures | Functions

# bzip.c File Reference

`#include "wizard/studio.h"`
`#include "wizard/bzip.h"`
`#include "wizard/exception.h"`
`#include "wizard/exception-private.h"`
`#include "wizard/memory_.h"`
`#include "bzlib.h"`

## Data Structures

struct | _BZIPInfo

## Functions

WizardExport BZIPInfo * | AcquireBZIPInfo (const size_t level)
WizardExport BZIPInfo * | DestroyBZIPInfo (BZIPInfo *bzip_info)
WizardExport const StringInfo * | GetBZIPChaos (const BZIPInfo *bzip_info)
static void * | AcquireBZIPMemory (void *context, int items, int size)
WizardExport void | bz_internal_error (int error)
static void | RelinquishBZIPMemory (void *context, void *memory)
WizardExport WizardBooleanType | IncreaseBZIP (BZIPInfo *bzip_info, const StringInfo *message, ExceptionInfo *exception)
WizardExport WizardBooleanType | RestoreBZIP (BZIPInfo *bzip_info, const size_t length, const StringInfo *message, ExceptionInfo *exception)

## Function Documentation

WizardExport BZIPInfo* AcquireBZIPInfo | ( | const size_t | level | ) |

References AcquireStringInfo(), AcquireWizardMemory(), _BZIPInfo::chaos, EntropyDomain, _BZIPInfo::level, MemoryError, ResetWizardMemory(), _BZIPInfo::signature, ThrowWizardFatalError, and _BZIPInfo::timestamp.

Referenced by AcquireEntropyInfo().

static void* AcquireBZIPMemory | ( | void * | context,
|  | int | items,
|  | int | size |
| ) |  |  | `[static]`

References AcquireQuantumMemory().

WizardExport void bz_internal_error | ( | int | error | ) |

References AssertError, EntropyDomain, and ThrowWizardFatalError.

WizardExport BZIPInfo* DestroyBZIPInfo | ( | BZIPInfo * | bzip_info | ) |

References _BZIPInfo::chaos, DestroyStringInfo(), EntropyDomain, GetWizardModule, LogWizardEvent(), RelinquishWizardMemory(), _BZIPInfo::signature, TraceEvent, WizardAssert, and WizardSignature.

Referenced by DestroyEntropyInfo().

WizardExport const StringInfo* GetBZIPChaos | ( | const BZIPInfo * | bzip_info | ) |

References _BZIPInfo::chaos, EntropyDomain, GetWizardModule, LogWizardEvent(), _BZIPInfo::signature, TraceEvent, WizardAssert, and WizardSignature.

Referenced by GetEntropyChaos().

WizardExport WizardBooleanType IncreaseBZIP | ( | BZIPInfo * | bzip_info,
|  | const StringInfo * | message,
|  | ExceptionInfo * | exception |
| ) |  |  |

References _BZIPInfo::chaos, EntropyDomain, GetStringInfoDatum(), GetStringInfoLength(), GetWizardModule, _BZIPInfo::level, LogWizardEvent(), SetStringInfoLength(), _BZIPInfo::signature, ThrowWizardException(), TraceEvent, WizardAssert, WizardFalse, WizardSignature, and WizardTrue.

Referenced by IncreaseEntropy().

static void RelinquishBZIPMemory | ( | void * | context,
|  | void * | memory |
| ) |  |  | `[static]`

References RelinquishWizardMemory().

WizardExport WizardBooleanType RestoreBZIP | ( | BZIPInfo * | bzip_info,
|  | const size_t | length,
|  | const StringInfo * | message,
|  | ExceptionInfo * | exception |
| ) |  |  |

References _BZIPInfo::chaos, EntropyDomain, GetStringInfoDatum(), GetStringInfoLength(), GetWizardModule, LogWizardEvent(), SetStringInfoLength(), _BZIPInfo::signature, ThrowWizardException(), TraceEvent, WizardAssert, WizardFalse, WizardSignature, and WizardTrue.

Referenced by RestoreEntropy().