Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MsDeltaCompression add signatures for byte[] and IntPtr and Stream #14

Open
Ravenheart opened this issue Aug 7, 2020 · 3 comments
Open

Comments

@Ravenheart
Copy link

Hello, can you add method signatures for byte[], IntPtr and Stream to the ApplyDelta and CreateDelta methods?

@taspeotis
Copy link
Owner

For MSDelta in particular there is a DELTA_INPUT structure that can be used to specify in-memory data instead of a file path.

For byte[] there is a somewhat straightforward mapping for input, possibly IntPtr too if it is a blob of memory, but Stream is more difficult because I'd have to buffer that into memory in its entirety first because using DELTA_INPUT since I see no way to describe to MSDelta a stream-like input or output structure.

So if you have the expectation that you could feed large inputs via Stream to MSDelta (that exceed the memory of the PC) then that would not be true.

Notwithstanding that caveat I could put this on the todo list.

@taspeotis
Copy link
Owner

What is your use case? Just curious. Thanks in advance.

@Ravenheart
Copy link
Author

Hi,

I'm currently pinvoking into a C dll that returns IntPtrs that I then process and record. My need currently is to do delta encoding in-memory, I can use either IntPtr source/destination or copy it into managed memory (byte[]).

Stream was just what came to mind next after byte[] and IntPtr :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants