OlehKulykov / PLzmaSDK

PLzmaSDK is (Portable, Patched, Package, cross-P-latform) Lzma SDK.
Other
85 stars 25 forks source link

Missing Streaming Interface for Swift #22

Closed herzi closed 1 year ago

herzi commented 1 year ago

I was assessing PLzmaSDK to see if it could be useful for my Swift based project which uses a protocol to abstract over (stream) compression implementations, a bit like this:

protocol DeflateProtocol {
    func append (_ buffer: Data) -> Data
    func finalize () -> Data
}

Possible solutions that I can see for PLzmaSDK to support this kind of interface:

Which of these sounds more acceptable for the PLzmaSDK project?

OlehKulykov commented 1 year ago

Hi, unfortunately, no one. Because the purpose of InStream is proving raw archive's file data buffer(from file, mem buff., network, etc.). It's not a compressed stream and this SDK is oriented on processing archives. For your needs(compressed streams), this SDK is preaty heavy, and you need only small C part of it.