MCPcopy Create free account
hub / github.com/apache/arrow / MakeCompressibleData

Function MakeCompressibleData

cpp/src/arrow/io/compressed_test.cc:59–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59std::vector<uint8_t> MakeCompressibleData(int data_size) {
60 std::string base_data =
61 "Apache Arrow is a cross-language development platform for in-memory data";
62 int nrepeats = static_cast<int>(1 + data_size / base_data.size());
63
64 std::vector<uint8_t> data(base_data.size() * nrepeats);
65 for (int i = 0; i < nrepeats; ++i) {
66 std::memcpy(data.data() + i * base_data.size(), base_data.data(), base_data.size());
67 }
68 data.resize(data_size);
69 return data;
70}
71
72std::shared_ptr<Buffer> CompressDataOneShot(Codec* codec,
73 const std::vector<uint8_t>& data) {

Callers 1

TEST_PFunction · 0.70

Calls 3

resizeMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected