diff --git a/benchmark/bench_crypto.cpp b/benchmark/bench_crypto.cpp index edc74af0..39493025 100644 --- a/benchmark/bench_crypto.cpp +++ b/benchmark/bench_crypto.cpp @@ -30,7 +30,7 @@ class SHA1Bench : public td::Benchmark { alignas(64) unsigned char data[DATA_SIZE]; std::string get_description() const override { - return PSTRING() << "SHA1 OpenSSL [" << (DATA_SIZE >> 10) << "kB]"; + return PSTRING() << "SHA1 OpenSSL [" << (DATA_SIZE >> 10) << "KB]"; } void start_up() override { @@ -55,7 +55,7 @@ class AESBench : public td::Benchmark { td::UInt256 iv; std::string get_description() const override { - return PSTRING() << "AES OpenSSL [" << (DATA_SIZE >> 10) << "kB]"; + return PSTRING() << "AES OpenSSL [" << (DATA_SIZE >> 10) << "KB]"; } void start_up() override { @@ -152,7 +152,7 @@ class Crc32Bench : public td::Benchmark { alignas(64) unsigned char data[DATA_SIZE]; std::string get_description() const override { - return PSTRING() << "Crc32 zlib [" << (DATA_SIZE >> 10) << "kB]"; + return PSTRING() << "Crc32 zlib [" << (DATA_SIZE >> 10) << "KB]"; } void start_up() override { @@ -176,7 +176,7 @@ class Crc64Bench : public td::Benchmark { alignas(64) unsigned char data[DATA_SIZE]; std::string get_description() const override { - return PSTRING() << "Crc64 Anton [" << (DATA_SIZE >> 10) << "kB]"; + return PSTRING() << "Crc64 Anton [" << (DATA_SIZE >> 10) << "KB]"; } void start_up() override { diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 0d09d5a8..57bfcaef 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -1512,7 +1512,7 @@ textEntityTypeTextUrl url:string = TextEntityType; textEntityTypeMentionName user_id:int32 = TextEntityType; -//@description A thumbnail to be sent along with a file; should be in JPEG or WEBP format for stickers, and less than 200 kB in size @thumbnail Thumbnail file to send. Sending thumbnails by file_id is currently not supported +//@description A thumbnail to be sent along with a file; should be in JPEG or WEBP format for stickers, and less than 200 KB in size @thumbnail Thumbnail file to send. Sending thumbnails by file_id is currently not supported //@width Thumbnail width, usually shouldn't exceed 320. Use 0 if unknown @height Thumbnail height, usually shouldn't exceed 320. Use 0 if unknown inputThumbnail thumbnail:InputFile width:int32 height:int32 = InputThumbnail; @@ -2735,7 +2735,7 @@ proxy id:int32 server:string port:int32 last_used_date:int32 is_enabled:Bool typ proxies proxies:vector = Proxies; -//@description Describes a sticker that should be added to a sticker set @png_sticker PNG image with the sticker; must be up to 512 kB in size and fit in a 512x512 square @emojis Emoji corresponding to the sticker @mask_position For masks, position where the mask should be placed; may be null +//@description Describes a sticker that should be added to a sticker set @png_sticker PNG image with the sticker; must be up to 512 KB in size and fit in a 512x512 square @emojis Emoji corresponding to the sticker @mask_position For masks, position where the mask should be placed; may be null inputSticker png_sticker:InputFile emojis:string mask_position:maskPosition = InputSticker; @@ -4228,7 +4228,7 @@ checkPhoneNumberConfirmationCode code:string = Ok; setBotUpdatesStatus pending_update_count:int32 error_message:string = Ok; -//@description Uploads a PNG image with a sticker; for bots only; returns the uploaded file @user_id Sticker file owner @png_sticker PNG image with the sticker; must be up to 512 kB in size and fit in 512x512 square +//@description Uploads a PNG image with a sticker; for bots only; returns the uploaded file @user_id Sticker file owner @png_sticker PNG image with the sticker; must be up to 512 KB in size and fit in 512x512 square uploadStickerFile user_id:int32 png_sticker:InputFile = File; //@description Creates a new sticker set; for bots only. Returns the newly created sticker set @user_id Sticker set owner @title Sticker set title; 1-64 characters @name Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_"* (** is case insensitive); 1-64 characters diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index 7364a3c5..d1f0476e 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -867,7 +867,7 @@ bool FileManager::are_modification_times_equal(int64 old_mtime, int64 new_mtime) } Status FileManager::check_local_location(FullLocalFileLocation &location, int64 &size) { - constexpr int64 MAX_THUMBNAIL_SIZE = 200 * (1 << 10) /* 200 kB */; + constexpr int64 MAX_THUMBNAIL_SIZE = 200 * (1 << 10) /* 200 KB */; constexpr int64 MAX_PHOTO_SIZE = 10 * (1 << 20) /* 10 MB */; if (location.path_.empty()) { diff --git a/tdutils/td/utils/format.h b/tdutils/td/utils/format.h index e646a583..0cf0f8a2 100644 --- a/tdutils/td/utils/format.h +++ b/tdutils/td/utils/format.h @@ -192,7 +192,7 @@ inline StringBuilder &operator<<(StringBuilder &logger, Size t) { uint64 value; }; - static constexpr NamedValue sizes[] = {{"B", 1}, {"kB", 1 << 10}, {"MB", 1 << 20}, {"GB", 1 << 30}}; + static constexpr NamedValue sizes[] = {{"B", 1}, {"KB", 1 << 10}, {"MB", 1 << 20}, {"GB", 1 << 30}}; static constexpr size_t sizes_n = sizeof(sizes) / sizeof(NamedValue); size_t i = 0; diff --git a/tdutils/td/utils/port/Stat.cpp b/tdutils/td/utils/port/Stat.cpp index ff1e20d9..a97e915a 100644 --- a/tdutils/td/utils/port/Stat.cpp +++ b/tdutils/td/utils/port/Stat.cpp @@ -251,7 +251,7 @@ Result mem_stat() { LOG(ERROR) << "Failed to parse memory stats " << tag("name", name) << tag("value", value); *x = static_cast(-1); } else { - *x = r_mem.ok() * 1024; // memory is in kB + *x = r_mem.ok() * 1024; // memory is in KB } } if (*s == 0) {