fix(types): uint64_t -> size_t

This commit is contained in:
2024-09-30 12:35:59 +03:00
parent be4f2ae036
commit 1d6b086bfa
14 changed files with 60 additions and 60 deletions

View File

@ -20,7 +20,7 @@ namespace baseN
* @param map int8_t[256] array, where at an index equal to the value of the symbol is the index of this symbol in the digits array. -1 if there is no symbol
* @return that string doesn't contain unnecessary symbols
*/
bool isValid(const char *str, uint64_t str_size, const int8_t *map) noexcept;
bool isValid(const char *str, size_t str_size, const int8_t *map) noexcept;
/**
* @param str string or string_view which you want to decode
* @param map int8_t[256] array, where at an index equal to the value of the symbol is the index of this symbol in the digits array. -1 if there is no symbol
@ -33,7 +33,7 @@ namespace baseN
* @param base from 1 to 255
* @return estimated size after encoding
*/
uint64_t sizeEncoded(std::span<const uint8_t> data, uint8_t base);
size_t sizeEncoded(std::span<const uint8_t> data, uint8_t base);
/**
* @param str string or string_view which you want to decode
* @param base from 1 to 255
@ -41,7 +41,7 @@ namespace baseN
* @return estimated size after decoding
* @throw std::overflow_error if if there is an overflow
*/
uint64_t sizeDecoded(std::string_view str, uint8_t base, const char *digits) noexcept;
size_t sizeDecoded(std::string_view str, uint8_t base, const char *digits) noexcept;
/**
* @param data [in] pointer to data which you want encode
@ -61,7 +61,7 @@ namespace baseN
* @return number of leading chars, which should be trimmed
* @warning contain leading zeros, returns count of them
*/
uint64_t encode(const uint8_t *data, uint64_t data_size, char *str, uint64_t str_size, uint8_t base, const char *digits);
size_t encode(const uint8_t *data, size_t data_size, char *str, size_t str_size, uint8_t base, const char *digits);
/**
* @param data vector or span of data which you want to encode
* @param base from 1 to 255
@ -93,7 +93,7 @@ namespace baseN
* @return number of leading chars, which should be trimmed
* @warning contain leading zeros, returns count of them
*/
uint64_t decode(const char *str, uint64_t str_size, uint8_t *data, uint64_t data_size, uint8_t base, const char *digits, const int8_t *map);
size_t decode(const char *str, size_t str_size, uint8_t *data, size_t data_size, uint8_t base, const char *digits, const int8_t *map);
/**
* @param str string or string_view which you want to decode
* @param base from 1 to 255