Compare commits

..

No commits in common. "9a0df4f577b788c304e35135f6c66fb4370b3f74" and "cff0c100ec4c0fecedec4c3e31c70df96bcde9c0" have entirely different histories.

3 changed files with 13 additions and 42 deletions

@ -1 +1 @@
Subproject commit c73f727adc99b2b73d09b7ebaa696b882ce535b6
Subproject commit 486306d854349f0fd7f919c73b8fd8cd1f369ee9

View File

@ -324,7 +324,6 @@ float ChatGui4::render(float time_delta) {
//tmp_view.use<Message::Components::Timestamp>();
//tmp_view.each([&](const Message3 e, Message::Components::ContactFrom& c_from, Message::Components::ContactTo& c_to, Message::Components::Timestamp ts
//) {
uint64_t prev_ts {0};
auto tmp_view = msg_reg.view<Message::Components::Timestamp>();
for (auto view_it = tmp_view.rbegin(), view_last = tmp_view.rend(); view_it != view_last; view_it++) {
const Message3 e = *view_it;
@ -342,34 +341,6 @@ float ChatGui4::render(float time_delta) {
// TODO: why?
ImGui::TableNextRow(0, TEXT_BASE_HEIGHT);
{ // check if date changed
// TODO: find defined ways of casting to time_t
std::time_t prev = prev_ts / 1000;
std::time_t next = ts.ts / 1000;
std::tm prev_tm = *std::localtime(&prev);
std::tm next_tm = *std::localtime(&next);
if (
prev_tm.tm_yday != next_tm.tm_yday ||
prev_tm.tm_year != next_tm.tm_year // making sure
) {
// name
if (ImGui::TableNextColumn()) {
//ImGui::TextDisabled("---");
}
// msg
if (ImGui::TableNextColumn()) {
ImGui::TextDisabled("DATE CHANGED from %d.%d.%d to %d.%d.%d",
1900+prev_tm.tm_year, prev_tm.tm_mon, prev_tm.tm_mday,
1900+next_tm.tm_year, next_tm.tm_mon, next_tm.tm_mday
);
}
ImGui::TableNextRow(0, TEXT_BASE_HEIGHT);
}
prev_ts = ts.ts;
}
ImGui::PushID(entt::to_integral(e));
// name

View File

@ -10,9 +10,9 @@ They can be used as a Transport protocol/logic too.
Fragment files are stored with the first 2 hex chars as sub folders:
eg:
`objects/` (object store root)
- `5f/` (first 2hex subfolder)
- `4fffffff` (the fragment file without the first 2 hexchars)
objects/ (object store root)
- 5f/ (first 2hex subfolder)
- 4fffffff (the fragment file without the first 2 hexchars)
### Split Object Store
@ -23,6 +23,7 @@ Metadata files have the `.meta` suffix. They also have a filetype specific suffi
Just keeps the Fragments in memory.
# File formats
Files can be compressed and encrypted. Since compression needs the data structure to funcion, it is applied before it is encrypted.
@ -33,9 +34,8 @@ Text json only makes sense for metadata if it's neither compressed nor encrypted
Since the content of data is not looked at, nothing stops you from using text json and ecrypt it, but atleast basic compression is advised.
A Metadata json object has the following keys:
- `enc` (uint) Encryption type of the data, if any
- `comp` (uint) Compression type of the data, if any
- `metadata` (obj) the
- `enc` Encryption type of the data, if any
- `comp` Compression type of the data, if any
## Binary file headers
@ -43,14 +43,14 @@ A Metadata json object has the following keys:
file magic bytes `SOLMET` (6 bytes)
1 byte encryption type (`0x00` is none)
1 byte encryption type (0x00 is none)
1 byte compression type (`0x00` is none)
1 byte compression type (0x00 is none)
...metadata here...
note that the encryption and compression are for the metadata only.
The metadata itself contains encryption and compression info about the data.
note that the ecnryption and compression are for the metadata only.
The metadata itself contains encryption and compression about the data.
### Split Data
@ -62,9 +62,9 @@ Keep in mind to not use the actual file name as the data/meta file name.
file magic bytes `SOLFIL` (6 bytes)
1 byte encryption type (`0x00` is none)
1 byte encryption type (0x00 is none)
1 byte compression type (`0x00` is none)
1 byte compression type (0x00 is none)
...metadata here...