This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.IO.Compression; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| /// <summary>Utility for analyzing compiled Sourcemod plugins.</summary> | |
| /// <remarks> | |
| /// Adapted from nosoop's read_sm_plugin.py gist, thanks for making a robust utility that still works after all the years! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def int_to_aii_numeral(num): | |
| # greedy approach similar to https://leetcode.com/problems/integer-to-roman/description/ | |
| # time O(1) | |
| # space O(1) | |
| # based on the numerals here: https://en.wiktionary.org/wiki/Module:number_list/data/aii | |
| numerals = [ | |
| (1000, 'ܐ݇'), | |
| (900, 'ܨ̈'), (800, 'ܦ̈'), (700, 'ܥ̈'), (600, 'ܣ̈'), (500, 'ܢ̈'), (400, 'ܬ'), | |
| (300, 'ܫ'), (200, 'ܪ'), (100, 'ܩ'), (90, 'ܨ'), (80, 'ܦ'), (70, 'ܥ'), (60, 'ܣ'), |