diff options
| author | Brian Potchik <brian@vector35.com> | 2025-10-03 18:48:17 -0400 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2025-10-03 18:48:17 -0400 |
| commit | 0fb07c24d8321bdec2d5d5a254acbb9ceaee807a (patch) | |
| tree | 181ed447398789d8f4d31614ee3edb8d81ebb0af /binaryview.cpp | |
| parent | 183ef5e2f0ba6124efac98efba67757f1e8b2aa9 (diff) | |
Add zero-copy data pointer access for BinaryData objects for API-side container transforms.
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index 21266886..66b7e77f 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -1747,6 +1747,18 @@ DataBuffer BinaryView::ReadBuffer(uint64_t offset, size_t len) } +const uint8_t* BinaryView::GetDataPointer() const +{ + return BNGetViewDataPointer(m_object); +} + + +size_t BinaryView::GetDataLength() const +{ + return BNGetViewDataLength(m_object); +} + + size_t BinaryView::WriteBuffer(uint64_t offset, const DataBuffer& data) { return BNWriteViewBuffer(m_object, offset, data.GetBufferObject()); |
