diff --git a/README.md b/README.md index 1db0f69..8a7f0cc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # (FTE-)QuakeC Hash Table Generator -`QCHashTableGenerator` is a simple utility designed to take in `.CSV` input files and generate an FTEQCC-compilable hash table structure, hashed using XMODEM CRC16. The overall goal is to ease compute time by mitigating the overall amount of string comparisons your QuakeC project may perform. +`QCHashTableGenerator` is a simple utility designed to take in `.CSV` input files and generate an FTEQCC-compilable hash table structure, hashed using IBM 3740 CRC16. The overall goal is to ease compute time by mitigating the overall amount of string comparisons your QuakeC project may perform. It makes the assumption that the first value in your input `.CSV` is the value you want to hash. Given this example, `old_path` will be replaced with a generated hash: diff --git a/qc_hash_generator.py b/qc_hash_generator.py index 516e645..f5219b1 100644 --- a/qc_hash_generator.py +++ b/qc_hash_generator.py @@ -3,7 +3,7 @@ Nazi Zombies: Portable QuakeC CRC generator Takes input .CSV files and outputs an FTEQCC-compilable QuakeC struct with its contents, always assumes the first -entry should be XMODEM CRC16 hashed, adding its length +entry should be IBM 3740 CRC16 hashed, adding its length as an entry as well, for collision detection. """ @@ -141,7 +141,7 @@ def read_csv_data(): for value in csv_data.values: original_lengths.append(len(value[0])) original_names.append(value[0]) - value[0] = int(crc16.xmodem(str.encode(value[0]))) + value[0] = int(crc16.ibm_3740(str.encode(value[0]))) # Now order everything by ascending order csv_data = csv_data.sort_values(csv_data.columns[0]) @@ -155,7 +155,7 @@ def fetch_cli_arguments(): Initiates ArgParser with all potential command line arguments. ''' global args - parser = argparse.ArgumentParser(description='XMODEM CRC16 hash generator in FTE QuakeC-readable data structure.') + parser = argparse.ArgumentParser(description='IBM 3740 CRC16 hash generator in FTE QuakeC-readable data structure.') parser.add_argument('-i', '--input-file', help='.CSV input file to parse.', required=True) parser.add_argument('-o', '--output-file',