Ejemplo n.º 1
0
// Returns a deterministic data of the given size that should be
// very compressible.
static SkData* new_test_data(size_t dataSize) {
    SkAutoTMalloc<uint8_t> testBuffer(dataSize);
    for (size_t i = 0; i < dataSize; ++i) {
        testBuffer[SkToInt(i)] = i % 64;
    }
    return SkData::NewFromMalloc(testBuffer.detach(), dataSize);
}
Ejemplo n.º 2
0
int main(void) {
	int result = testBuffer();
	result = result + testNormalizer();
	return result > 0;
}