MaxMartST / OOP

Курс по объектно ориентированному программированию
1 stars 0 forks source link

Замечания по RLE #4

Open alexey-malov opened 4 years ago

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/ce80b047ed5d138c564dad1dcdbd7f7d3e4b32bb/Lw%201/lab1.4%20rle/lab1.4%20rle/main.cpp#L6-L8

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/ce80b047ed5d138c564dad1dcdbd7f7d3e4b32bb/Lw%201/lab1.4%20rle/lab1.4%20rle/ParseArgument.h#L9-L14

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/ce80b047ed5d138c564dad1dcdbd7f7d3e4b32bb/Lw%201/lab1.4%20rle/lab1.4%20rle/LinkerBinaryFile.cpp#L9

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/ce80b047ed5d138c564dad1dcdbd7f7d3e4b32bb/Lw%201/lab1.4%20rle/lab1.4%20rle/LinkerBinaryFile.cpp#L15-L44

struct RLEChunk
{
    char currentChar;
    uint8_t counter = 0;
};

// обновляет чанк новым символом
// возвращает true в случае успеха
// может вызвать FluchChunk
bool PackNextChar(RLEChunk& chunk, char ch, ostream& output);

// Сбрасывает chunk в выходной поток и обнуляет счётчик
bool FlushChunk(RLEChunk& chunk, ostream& output);
alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/ce80b047ed5d138c564dad1dcdbd7f7d3e4b32bb/Lw%201/lab1.4%20rle/lab1.4%20rle/LinkerBinaryFile.cpp#L91

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/ce80b047ed5d138c564dad1dcdbd7f7d3e4b32bb/Lw%201/lab1.4%20rle/lab1.4%20rle/LinkerBinaryFile.cpp#L64-L77

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/ce80b047ed5d138c564dad1dcdbd7f7d3e4b32bb/Lw%201/lab1.4%20rle/lab1.4%20rle/LinkerBinaryFile.cpp#L110-L130

bool Pack(istream& input, ostream& output); bool Unpack(istream& input, ostream& output);

bool Foo(const Args& args) { switch (args->command) { case Command:Pack: return TransformFile(args.inputFileName, args.outputFileName, Pack); case Command::Unpack: return TransformFile(args.inputFileName, args.outputFileName, Unpack); } }

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/67e9588eec3182d003b936b8d4af62e56358ec76/Lw%201/lab1.4%20rle/lab1.4%20rle/ArchiverBinaryFile.cpp#L74

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/67e9588eec3182d003b936b8d4af62e56358ec76/Lw%201/lab1.4%20rle/lab1.4%20rle/ArchiverBinaryFile.cpp#L59-L72

alexey-malov commented 4 years ago
alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/67e9588eec3182d003b936b8d4af62e56358ec76/Lw%201/lab1.4%20rle/lab1.4%20rle/ArchiverBinaryFile.cpp#L91-L100

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/987c97d2246105c069cbdb83fd985845e65e6ccd/Lw%201/lab1.4%20rle/lab1.4%20rle/ArchiverBinaryFile.cpp#L68-L91

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/987c97d2246105c069cbdb83fd985845e65e6ccd/Lw%201/lab1.4%20rle/lab1.4%20rle/ArchiverBinaryFile.cpp#L93-L105

alexey-malov commented 4 years ago

https://github.com/MaxMartST/OOP/blob/987c97d2246105c069cbdb83fd985845e65e6ccd/Lw%201/lab1.4%20rle/lab1.4%20rle/ArchiverBinaryFile.cpp#L44-L61