Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 29 00:04
    SageSystems opened #138
  • May 21 08:44
    schnaader review_requested #136
  • May 21 08:43
    schnaader review_requested #137
  • Apr 29 03:25
    as-com commented #126
  • Apr 29 03:24
    as-com opened #137
  • Apr 25 22:44
    as-com commented #126
  • Apr 25 22:43
    as-com commented #126
  • Apr 25 22:26
    as-com commented #126
  • Apr 08 23:07
    M-Gonzalo commented #135
  • Apr 08 23:06
    M-Gonzalo commented #135
  • Mar 25 17:17
    WillyPillow edited #136
  • Mar 23 03:54
    WillyPillow opened #136
  • Feb 11 19:00
    redthing1 commented #55
  • Jan 19 15:04
    schnaader commented #135
  • Jan 19 14:36
    rayman3003 commented #135
  • Jan 19 10:52
    schnaader closed #135
  • Jan 19 10:33
    rayman3003 commented #135
  • Jan 19 10:05
    schnaader commented #135
  • Jan 18 18:31
    rayman3003 opened #135
  • Nov 22 2021 22:23
    schnaader closed #134
Christian Schneider
@schnaader
Since the software and the pcf files are platform independent, I wanted to make sure that 0x1234 is always written as 0x12, 0x34 instead of the usual 0x34, 0x12 and this won't change with platforms/compilers - also don't like the 3412 format because it isn't readable in hex editors :smile:
But there might be some clever way to both cast and ensure endianness.
jagannatharjun
@jagannatharjun
cpp20 wil have a compile time endianness detection
i think we can still do it with constexpr
Christian Schneider
@schnaader
I'm open to any code quality suggestions like this. The code as it is uses very little modern concepts, I'm pretty sure parts of it are still from the original code from 2006.
Too much features, not enough refactoring, not enough time, the usual..
jagannatharjun
@jagannatharjun
will you accept an external library for CLI
may be depreciated precomf?
Christian Schneider
@schnaader
This would help very much, yes. As long as it keeps the parameter syntax, of course. Would also solve schnaader/precomp-cpp#9 , I guess
jagannatharjun
@jagannatharjun
i can but can we use this, then we don't have to worry about such things
boost has also it's own CLI interface so maybe start using boost, u never know what u need next
Christian Schneider
@schnaader
Will look into both, thanks. Boost also has endian buffers (http://www.boost.org/doc/libs/1_62_0/libs/endian/doc/buffers.html ), so yeah, like you said, never know what's needed next
jagannatharjun
@jagannatharjun
i can start working on it if you say
jagannatharjun
@jagannatharjun
can i add ZlibWrapper to precomp
Christian Schneider
@schnaader
Sure, feel free to fork and send pull requests :+1: Thanks in advance!
pasha-zzz
@pasha-zzz
Sometimes streams are encoded by base64 (maybe mime or uue)... What about recompression of such streams?
Christian Schneider
@schnaader
Base64 wrapped by mime should already work, others most certainly won't. The problem is that most text could be base64, so many potential false positives. I'll try a potential solution I had in mind that is similar to intense/brute mode - it will decode base64 always, so false positives, too, but will only keep it if something else (PNG/gif/...) is found in recursion
Also see schnaader/precomp-cpp#43
pasha-zzz
@pasha-zzz
Maybe add option to test for b64? My file contains "base64:77u/PCFET0NUWVB....", "base64:iVBORw0KGgoAAAANSU..." and so on. About text files: texts w/o spaces? Rare case. Simply add minimal b64 length for detection I think...
jagannatharjun
@jagannatharjun
can you provide an overview of pcf format?
Christian Schneider
@schnaader
Good idea, I can add the format description to the wiki. Basically, it's a small header ("PCF" + version) followed by two types of blocks, interleaved: 1. unmodified (copied) data, 2. Processed streams
jagannatharjun
@jagannatharjun
Actually i am trying to make restoration parallel but the source code is too complex for me
Christian Schneider
@schnaader
I think the restoration part isn't that complex, it's the code around that is a big mess. Let me see if I can show you the relevant bits.
Christian Schneider
@schnaader
It goes through the file and looks for the mentioned block identifiers (0 = uncompressed, else progressed add
*processed streams)
In the big switch case afterwards are the routines for all the stream types. I'd suggest to start with MP3 and/or JPG for parallelism changes. They are quite slow and they don't involve recursion which would make things complicated.
My main idea for it was to start an async task with the reconstruction code and write 0 bytes to the output file (length of reconstructed stream is known). This way, the task can later write to the output file and only I/O has to be synchronized.