#include "core/compressors/RawBpp.h"

namespace bmp2tile
{

std::vector<uint8_t> CompressRaw1Bpp(const std::vector<uint8_t>& input)
{
    std::vector<uint8_t> output;
    output.reserve(input.size() / 4);
    for (size_t i = 0; i + 4 <= input.size(); i += 4)
    {
        output.push_back(input[i]);
    }
    return output;
}

std::vector<uint8_t> CompressRaw2Bpp(const std::vector<uint8_t>& input)
{
    std::vector<uint8_t> output;
    output.reserve(input.size() / 2);
    for (size_t i = 0; i + 4 <= input.size(); i += 4)
    {
        output.push_back(input[i]);
        output.push_back(input[i + 1]);
    }
    return output;
}

}  // namespace bmp2tile
