labs-edaf30/lab1/coding.cc

11 lines
140 B
C++
Raw Normal View History

2021-10-27 15:15:47 +02:00
#include<coding.h>
unsigned char encode(unsigned char c)
{
2024-11-12 12:53:50 +01:00
return c + 2;
2021-10-27 15:15:47 +02:00
}
unsigned char decode(unsigned char c)
{
2024-11-12 12:53:50 +01:00
return c - 2;
2021-10-27 15:15:47 +02:00
}