Is there a file merging framework or system extension?

Do we have a file merging library or a system extension for merging chunks of small files into a larger one in iOS?


My problem statement is as follows:

Suppose there is a large file on the server's end, which is divided into a series of chunks (1 to n), like dividing a zip into 'n' parts or chunks.
And at the client/iOS's end, I need to have a file merging library, which will match the hash of all the chunks, verify its integrity and merge them back together to form a complete file.


Do we have the readymade library or do I need to write it from scratch?

Accepted Reply

There’s nothing like that built in to iOS.

There may be a third-party library for this; it’s not something that I’ve researched.

Doing this requires agreement between the client and the server, that is, the code that generates the segments (and their checksums) on the server would have to follow the same rules as the code that checks and reassembles the segments on the client. Do you already have a server implementation? Was it written to some standard?

If so, you may be able to use the name of that standard to search for a third-party library you can use on iOS.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

ps DTS is closed 25…29 Nov in observance of the US Thanksgiving holiday.

Replies

There’s nothing like that built in to iOS.

There may be a third-party library for this; it’s not something that I’ve researched.

Doing this requires agreement between the client and the server, that is, the code that generates the segments (and their checksums) on the server would have to follow the same rules as the code that checks and reassembles the segments on the client. Do you already have a server implementation? Was it written to some standard?

If so, you may be able to use the name of that standard to search for a third-party library you can use on iOS.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

ps DTS is closed 25…29 Nov in observance of the US Thanksgiving holiday.

Yes, I found implementations of the merging/splitting iOS client libraries for the video format.


In many ways, it is similar to the background downloading of the Netflix app, diving in chunks, redownloading it one by one and joining it on the client, for a full playable file.


Apple also has a streaming tool, in its arsenal, coupled with a compression API

@https://developer.apple.com/documentation/compression which can be used for the end-to-end implementation of any other file format