Anon 02/03/2024 (Sat) 20:47 No.9495 del
>>9494
Here's proof-of-concept for "Block sharing with 256K chunks, padding, and concatenated MP3 files":
$ ipfs ls QmTyN5RH6BpebN1ofNQHfAwEdai9H87Z11To656GsR9ca3
QmXPwc3EAVQz8TdLHZrLdQEnZFRqQUCuU1cXsVkKu2y26d 12231026 Sim Gretina & Feather - Allons-y (Ephora remix).mp3
QmPwug4HSDXTUygw5FRnZHED7c3kgjJHoU3WWAT6FC9kJQ 8704394  Sim Gretina & donglekumquat - Everyponys Gay For Braeburn.mp3
QmVfWCLkyk5NWHoMfmUN2hpRaKyqqinKE1qGN3AXJh12zf 7914086  Sim Gretina - A Cottage At The Edge Of The Forest.mp3
QmRmVTq8hLe9UcqWriGrtXLZekieGFRXxGPXmqvuVrQYFq 8855774  Sim Gretina - A Story Hidden Beneath Thorn.mp3
QmWboyk3ULoZPjjDh2EEtzzixqSb5jd4JAipxVDfCud6h7 12584942 Sim Gretina - Allons-y (Baq5&Toned Remix).mp3
$ [...]
$ f='Sim Gretina & donglekumquat - Everyponys Gay For Braeburn.mp3'
$ n=$(stat --format=%s "$f"); multiple=$(( (n + 262144 - 1) / 262144 * 262144 )); \
diff=$(expr $multiple - $n); echo $n $multiple $diff; cat /dev/zero | head --bytes=$diff > tempzero.bin
8704394 8912896 208502
$ cat "$f" "tempzero.bin" > pad2.bin
[...]
$ cat pad1.bin pad2.bin pad3.bin pad4.bin pad5.bin > padded.mp3
$ ipfs add -w padded.mp3 # *Cottage*.mp3 = first in padded.mp3
added QmdwGugswZp4jRhGPXcgMC96ZgDx6hgPnUUgrqLuLCwRjx padded.mp3
added QmXKyrCAP44dpwKNQQQiCFYWxpYmJtLbKcNG2eCRTj384E [48.75 MiB]
$ ipfs ls QmdwGugswZp4jRhGPXcgMC96ZgDx6hgPnUUgrqLuLCwRjx # blocks in padded.mp3
QmZ8YjijiVarYUPWv8gSUhkA6UgXa17HCyB5tZo3Vh6Sfe 45613056 
QmRHLLQEFdUAQ9tdcu2QMXoBxQ8HgUzrfeCdfoagUekS5s 5505024  
$ ipfs ls QmWboyk3ULoZPjjDh2EEtzzixqSb5jd4JAipxVDfCud6h7 | head -n1 # first block in *Toned*.mp3
QmaY9DyBUttPdy3CpN2anR6R5qGxfoubUtWbr2nTT9abYu 262144 
$ ipfs ls QmZ8YjijiVarYUPWv8gSUhkA6UgXa17HCyB5tZo3Vh6Sfe | grep -n QmaY9DyBUttPdy3CpN2anR6R5qGxfoubUtWbr2nTT9abYu
66:QmaY9DyBUttPdy3CpN2anR6R5qGxfoubUtWbr2nTT9abYu 262144 
$ # first block in *Toned*.mp3 is also a block in "padded.mp3"

So, original files at ipfs://QmTyN5RH6BpebN1ofNQHfAwEdai9H87Z11To656GsR9ca3 share most of their blocks with pad*.mp3 at ipfs://QmXKyrCAP44dpwKNQQQiCFYWxpYmJtLbKcNG2eCRTj384E (so less storage usage) - the only difference is the non-zero-padded tail blocks and zero-padded tail blocks. Why do this? One of the reasons: if you are using crappy software and hardware and want to listen to hours of music. So instead of continually clicking on and opening ~minutes-long audio files, you can open an ~hours-long audio file and listen to it. Most/all browsers should be able to play all the audio of an audio file which is a bunch MP3s glued together. For QmTy...9ca3 vs. QmXK...384E: the difference was only about 1MB or roughly a floppy disk drive's storage capacity (FDD=1.44MB). Padding is needed so that the blocks line up at the same byte offsets.