Raised This Month: $12 Target: $400
 3% 

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


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

Spoiler


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 18:10. Reason: nvm. i'm a dummy
thedudeguy1 is offline
rogeraabbccdd
Veteran Member
Join Date: Jun 2015
Location: de_dust2
Old 08-07-2018 , 04: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?
__________________

Please keep in mind, nobody have responsibility to help you, especially who don't try to Google first.
I only read messages in Chinese and English.

GitHub | Discord:Kento#2118

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

Quote:
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
Bara
AlliedModders Donor
Join Date: Apr 2012
Location: Germany
Old 06-27-2019 , 14:18   Re: [EXTENSION] bzip2 Compression v0.0.2 (2011-12-29)
Reply With Quote #24

Code:
#if defined _bzip2_included
 #endinput
#endif
#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_DATA_ERROR_MAGIC  = -5,
    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",
#if defined AUTOLOAD_EXTENSIONS
    autoload = 1,
#else
    autoload = 0,
#endif
#if defined REQUIRE_EXTENSIONS
    required = 1,
#else
    required = 0,
#endif
};

#if !defined REQUIRE_EXTENSIONS
public __ext_bzip2_SetNTVOptional()
{
    MarkNativeAsOptional("BZ2_DecompressFile");
    MarkNativeAsOptional("BZ2_CompressFile");
}
#endif
__________________
Discord (Bara#5006) | My Plugins (GitHub)
You like my work? Support is not a crime.

Last edited by Bara; 06-27-2019 at 14:19.
Bara is offline
bruuztax
New Member
Join Date: Mar 2021
Old 03-29-2021 , 07:14   Re: [EXTENSION] bzip2 Compression v0.0.2 (2011-12-29)
Reply With Quote #25

how do i even install this in my csgo game server exactly? im confused.
bruuztax is offline
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 07-28-2023 , 08:02   Re: [EXTENSION] bzip2 Compression v0.0.2 (2011-12-29)
Reply With Quote #26

Can anyone recompile under the latest stable sourcemod?
__________________
[/URL]
Alexmy is offline
Alienmario
Senior Member
Join Date: Aug 2013
Old 08-04-2023 , 12:39   Re: [EXTENSION] bzip2 Compression v0.0.2 (2011-12-29)
Reply With Quote #27

Quote:
Originally Posted by Alexmy View Post
Can anyone recompile under the latest stable sourcemod?
I've found a linux binary in a fork.
Though I'm wondering if there's a point to using this extension anymore when System2 can do more and appears somewhat maintained?
Alienmario is offline
Reply


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 08:27.


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