Skip to content

[Feature Request] iOS+Android: Message optimization for non-latin languages #2422

@HDDen

Description

@HDDen

Hello! I’d like to suggest a way to optimise messages containing non-Latin characters. I’ll use Cyrillic as an example.

Cyrillic characters are encoded using two bytes, whereas Latin characters use just one. It is possible to replace Cyrillic characters in a message with visually similar Latin characters, thereby reducing the message’s data size without actually losing or distorting the information being transmitted.

In practice, this optimisation reduces the message size by 15–25% (17% on average). In effect, this is a cost-free optimisation suitable for both channels and private messages, and it is backwards compatible – a client without this modification can read the received message without any issues.

It is proposed that this be implemented on the mobile app side as an optional feature, so as not to overload node, and to allow it to be quickly enabled or disabled. It is also proposed to implement editing of the substitution dictionary to allow for its extension to other languages.

Default Cyrillic-to-Latin dictionary example:
{
    "А": "A",
    "В": "B",
    "Е": "E",
    "Ё": "E",
    "З": "3",
    "К": "K",
    "М": "M",
    "Н": "H",
    "О": "O",
    "Р": "P",
    "С": "C",
    "Т": "T",
    "Х": "X",
    "Ь": "b",
    "а": "a",
    "е": "e",
    "ё": "e",
    "о": "o",
    "р": "p",
    "с": "c",
    "у": "y",
    "х": "x"
  }

Examples of implementation in alternative apps:
zjs81/meshcore-open#400
jkingsman/Remote-Terminal-for-MeshCore#223

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions