❔ Using Octodiff to Patch Local Files From Remote

Hi, all. As a learning project for C#, I'm trying to build a simple patcher for TES3MP. VERY Simple. I discovered the Octodiff library which seemed perfect for what I want to do: https://github.com/OctopusDeploy/Octodiff It says pretty clearly that: "Octodiff can make deltas of files by comparing a remote file with a local file, without needing both files to exist on the same machine." I got the C# Assemblies installed and tested with a local file, worked fine. I then took the example code on their website and plugged in names of files and directories which actually existed on my system; patch went great. I then tried to feed it an http stream, instead of a local file stream, and it generates these errors:
Time Elapsed 00:00:02.26
Unhandled exception. System.NotSupportedException: Specified method is not supported.
at System.Net.Http.HttpBaseStream.get_Length()
at Octodiff.Core.SignatureBuilder.WriteMetadata(Stream stream, ISignatureWriter signatureWriter)
at Octodiff.Core.SignatureBuilder.Build(Stream stream, ISignatureWriter signatureWriter)
at Program.Main() in /home/s3kshun-8/GitHub/FOSSLaunch-CLI/fossdiff/Program.cs:line 26
at Program.<Main>()
Time Elapsed 00:00:02.26
Unhandled exception. System.NotSupportedException: Specified method is not supported.
at System.Net.Http.HttpBaseStream.get_Length()
at Octodiff.Core.SignatureBuilder.WriteMetadata(Stream stream, ISignatureWriter signatureWriter)
at Octodiff.Core.SignatureBuilder.Build(Stream stream, ISignatureWriter signatureWriter)
at Program.Main() in /home/s3kshun-8/GitHub/FOSSLaunch-CLI/fossdiff/Program.cs:line 26
at Program.<Main>()
I get the impression what I'm trying to accomplish will simply not be possible unless I implement some code which runs on the remote host to produce the delta file, or just download the files before diffing them, which totally defeats the point. Just wondering if perhaps I'm missing an intermediate step to simply read these remote files without actually taking the time to download them.
GitHub
GitHub - OctopusDeploy/Octodiff: | Public | 100% C# implementation...
| Public | 100% C# implementation of remote delta compression based on the rsync algorithm - GitHub - OctopusDeploy/Octodiff: | Public | 100% C# implementation of remote delta compression based o...
1 Reply
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server