[frameworks-karchive] [Bug 451816] improper usage of ZSTD_compressStream2 API

2022-05-31 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=451816

Albert Astals Cid  changed:

   What|Removed |Added

 Resolution|--- |FIXED
  Latest Commit||https://invent.kde.org/fram
   ||eworks/karchive/commit/0288
   ||02998b11163dd761b579000f5cb
   ||89fab18d3
 Status|ASSIGNED|RESOLVED

--- Comment #5 from Albert Astals Cid  ---
Git commit 028802998b11163dd761b579000f5cb89fab18d3 by Albert Astals Cid.
Committed on 31/05/2022 at 08:47.
Pushed by aacid into branch 'master'.

Fix zstd KCompressionDevice not compressing as much as it could

M  +37   -4autotests/kfiltertest.cpp
M  +1-1autotests/kfiltertest.h
M  +1-1src/kzstdfilter.cpp

https://invent.kde.org/frameworks/karchive/commit/028802998b11163dd761b579000f5cb89fab18d3

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-karchive] [Bug 451816] improper usage of ZSTD_compressStream2 API

2022-05-30 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=451816

Bug Janitor Service  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|REPORTED|ASSIGNED

--- Comment #4 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/frameworks/karchive/-/merge_requests/38

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-karchive] [Bug 451816] improper usage of ZSTD_compressStream2 API

2022-05-30 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=451816

--- Comment #3 from tooli...@yahoo.com ---
Usage model is:
@code
KCompressionDevice compressor(, false,
KCompressionDevice::Zstd);
if (compressor.open(QIODevice::WriteOnly)) {
  QDataStream stream();
  stream << [My class: makes many calls to << operator for each component
containers part,...] ;
  compressor.close();
  compressedModule.close();
}
@endcode

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-karchive] [Bug 451816] improper usage of ZSTD_compressStream2 API

2022-05-30 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=451816

--- Comment #2 from tooli...@yahoo.com ---
Hi,
>From faceboot zstd Q:

https://github.com/facebook/zstd/issues/1360

Comment is: 

using ZSTD_e_flush will force the compressor to emit a block immediately. In
general, this requirement is for communication scenarios, when some data must
be sent "now".

Because it increases the nb of blocks produced, this technique can be
associated with some lower compression ratio. Therefore, whenever there is no
need to send data immediately, it's better (for compression ratio) to let the
data accumulate in the internal buffers, and let the compressor decide when
it's best to output a new block.

As stated above:

Using flush in a device is not a good idea. It result in a flush for each
pieces of data that is send to the device using << operators, which breaks
compression. That is why i suggest to use ZSTD_e_continue instead.

I am using it regularily for my project and without the changes, the API is
just not working at all (Not compression anything).

Regards

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-karchive] [Bug 451816] improper usage of ZSTD_compressStream2 API

2022-05-30 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=451816

--- Comment #1 from Albert Astals Cid  ---
Can you explain why?

Give some test? some reasoning?

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-karchive] [Bug 451816] improper usage of ZSTD_compressStream2 API

2022-05-29 Thread Ahmad Samir
https://bugs.kde.org/show_bug.cgi?id=451816

Ahmad Samir  changed:

   What|Removed |Added

 CC||a.samir...@gmail.com,
   ||aa...@kde.org

-- 
You are receiving this mail because:
You are watching all bug changes.