Post 9xZ48JcfGH3wu9Tvxg by efi@chitter.xyz
 (DIR) More posts by efi@chitter.xyz
 (DIR) Post #9xZ48J1nTLZX3oEUUq by efi@chitter.xyz
       2020-07-29T00:10:22Z
       
       0 likes, 0 repeats
       
       so, like, I am thinking about this thing that is -obviously- a solved problem in computers, right? but, like... where???I want a program that, given a description of a file format, it can then unwrap that file into a manageable interfaceclearly, this has to exist already, right?right?
       
 (DIR) Post #9xZ48JcfGH3wu9Tvxg by efi@chitter.xyz
       2020-07-29T00:12:37Z
       
       0 likes, 0 repeats
       
       say I have a very stupid file format, the first byte is the file length, the rest of the file is the contentsI give the program this information and it gives me a number input for the first byte and a string input for the contentsthat's all I needdoes this exist???
       
 (DIR) Post #9xZ48JtKGKOFjpHEvo by tomosaigon@fosstodon.org
       2020-07-29T02:47:38Z
       
       0 likes, 0 repeats
       
       @efi I don't know of any format like that, because the filesystem tells you the file size so putting it in the file would be redundant.
       
 (DIR) Post #9xZfUUTLIeznEGYh1c by efi@chitter.xyz
       2020-07-29T09:46:12Z
       
       0 likes, 0 repeats
       
       @tomosaigon t'was an example of the kind of data, it's very common to have sections of data with the size as a header
       
 (DIR) Post #9xa4SDEKvr9Q1qYAaG by tomosaigon@fosstodon.org
       2020-07-29T14:25:56Z
       
       0 likes, 0 repeats
       
       @efi I only see inline length in streams (network data) like packet size. For parsing network protocols, there's protobuf. Maybe you can use that.