MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / Append

Method Append

Bcore/src/main/cpp/ziparchive/zip_archive.cc:759–769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

757 MemoryWriter(uint8_t* buf, size_t size) : Writer(), buf_(buf), size_(size), bytes_written_(0) {}
758
759 virtual bool Append(uint8_t* buf, size_t buf_size) override {
760 if (bytes_written_ + buf_size > size_) {
761 //chensenhua ALOGW("Zip: Unexpected size " ZD " (declared) vs " ZD " (actual)", size_,
762 //chensenhua bytes_written_ + buf_size);
763 return false;
764 }
765
766 memcpy(buf_ + bytes_written_, buf, buf_size);
767 bytes_written_ += buf_size;
768 return true;
769 }
770
771 private:
772 uint8_t* const buf_;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected