Raised This Month: $52 Target: $400

[EXTENSION] bzip2 Compression v0.0.2 (2011-12-29)

Post New Thread Reply   
Thread Tools Display Modes
Senior Member
Join Date: Oct 2014
Old 06-07-2016 , 18:17   Re: [EXTENSION] bzip2 Compression v0.0.2 (2011-12-29)
Reply With Quote #21


Never mind. I had -nohltv in my startup options and this was complaining because it was requested to upload blank bz2 files.
A computer is like an Old Testament god, with a lot of rules and no mercy. -Joseph Campbell

Last edited by thedudeguy1; 06-07-2016 at 19:10. Reason: nvm. i'm a dummy
thedudeguy1 is offline
Veteran Member
Join Date: Jun 2015
Location: de_dust2
Old 08-07-2018 , 05:02   Re: [EXTENSION] bzip2 Compression v0.0.2 (2011-12-29)
Reply With Quote #22

Anyone still using this?
inc needs an update for SM1.10.

Can someone convert this to new syntax?

My steam friend list is almost full, please use Discord instead.
I seldom check my plugin threads, you can DM me on Discord.

GitHub | Steam | WARMOD+ | Discord:Kento#2118

Last edited by rogeraabbccdd; 08-07-2018 at 05:18.
rogeraabbccdd is offline
New Member
Join Date: Apr 2016
Old 06-27-2019 , 11:30   Re: [EXTENSION] bzip2 Compression v0.0.2 (2011-12-29)
Reply With Quote #23

Originally Posted by rogeraabbccdd View Post
Anyone still using this?
inc needs an update for SM1.10.

Can someone convert this to new syntax?
Yeah good think, please update syntax!
Stryju is offline
AlliedModders Donor
Join Date: Apr 2012
Location: Germany
Old 06-27-2019 , 15:18   Re: [EXTENSION] bzip2 Compression v0.0.2 (2011-12-29)
Reply With Quote #24

#if defined _bzip2_included
#define _bzip2_included

enum BZ_Error {
    BZ_OK                = 0,
    BZ_RUN_OK            = 1,
    BZ_FLUSH_OK          = 2,
    BZ_FINISH_OK         = 3,
    BZ_STREAM_END        = 4,
    BZ_SEQUENCE_ERROR    = -1,
    BZ_PARAM_ERROR       = -2,
    BZ_MEM_ERROR         = -3,
    BZ_DATA_ERROR        = -4,
    BZ_IO_ERROR          = -6,
    BZ_UNEXPECTED_EOF    = -7,
    BZ_OUTBUFF_FULL      = -8,
    BZ_CONFIG_ERROR      = -9,
    BZ_IO_ERROR_INPUT    = -101,
    BZ_IO_ERROR_OUTPUT   = -102,

typeset BZ2Callback {
  function int (BZ_Error iError, char[] inFile, char[] outFile, any data);

native void BZ2_DecompressFile(char[] inFile, char[] outFile, BZ2Callback cb, any data = 0);
native void BZ2_CompressFile(char[] inFile, char[] outFile, int iCompressionLevel, BZ2Callback cb, any data = 0);

stock void BZ2_Error(BZ_Error iError, char[] sError, int iErrorStringLength) {
    switch(iError) {
        case BZ_OK: strcopy(sError, iErrorStringLength, "BZ_OK");
        case BZ_RUN_OK: strcopy(sError, iErrorStringLength, "BZ_RUN_OK");
        case BZ_FLUSH_OK: strcopy(sError, iErrorStringLength, "BZ_FLUSH_OK");
        case BZ_FINISH_OK: strcopy(sError, iErrorStringLength, "BZ_FINISH_OK");
        case BZ_STREAM_END: strcopy(sError, iErrorStringLength, "BZ_STREAM_END");
        case BZ_SEQUENCE_ERROR: strcopy(sError, iErrorStringLength, "BZ_SEQUENCE_ERROR");
        case BZ_PARAM_ERROR: strcopy(sError, iErrorStringLength, "BZ_PARAM_ERROR");
        case BZ_MEM_ERROR: strcopy(sError, iErrorStringLength, "BZ_MEM_ERROR");
        case BZ_DATA_ERROR: strcopy(sError, iErrorStringLength, "BZ_DATA_ERROR");
        case BZ_DATA_ERROR_MAGIC: strcopy(sError, iErrorStringLength, "BZ_DATA_ERROR_MAGIC");
        case BZ_IO_ERROR: strcopy(sError, iErrorStringLength, "BZ_IO_ERROR");
        case BZ_UNEXPECTED_EOF: strcopy(sError, iErrorStringLength, "BZ_UNEXPECTED_EOF");
        case BZ_OUTBUFF_FULL: strcopy(sError, iErrorStringLength, "BZ_OUTBUFF_FULL");
        case BZ_CONFIG_ERROR: strcopy(sError, iErrorStringLength, "BZ_CONFIG_ERROR");
        case BZ_IO_ERROR_INPUT: strcopy(sError, iErrorStringLength, "BZ_IO_ERROR_INPUT");
        case BZ_IO_ERROR_OUTPUT: strcopy(sError, iErrorStringLength, "BZ_IO_ERROR_OUTPUT");

stock void LogBZ2Error(BZ_Error iError, const char[] sSuffix = "") {
    char sError[255];
    BZ2_Error(iError, sError, sizeof(sError));
    LogError("bzip2 Error: %s %s", sError, sSuffix);

 * Do not edit below this line!
public Extension __ext_bzip2 =
    name = "SMbz2",
    file = "smbz2.ext",
    autoload = 1,
    autoload = 0,
    required = 1,
    required = 0,

public __ext_bzip2_SetNTVOptional()

Last edited by Bara; 06-27-2019 at 15:19.
Bara is offline

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 19:07.

Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode