mdedetrich commented on code in PR #2409:
URL: https://github.com/apache/pekko/pull/2409#discussion_r2560536479


##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/compression/ZstdDictionary.java:
##########
@@ -0,0 +1,205 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.pekko.stream.javadsl.compression;
+
+import org.apache.pekko.annotation.InternalApi;
+import org.apache.pekko.stream.impl.io.compression.ZstdDictionaryImpl;
+import org.apache.pekko.util.ByteString;
+import org.apache.pekko.util.OptionalUtil;
+import scala.Option;
+
+import java.util.OptionalInt;
+
+/**
+ * @since 2.0.0
+ */
+public class ZstdDictionary {
+    byte[] dictionary;

Review Comment:
   > Is this somehow a standardized "zstd thing" or something still tied to 
this particular implementation
   
   Yes its entirely standerdized as part of the official C API (see 
https://github.com/facebook/zstd?tab=readme-ov-file#dictionary-compression-how-to
 and https://facebook.github.io/zstd/zstd_manual.html#Chapter10.
   
   >  think that needs to be documented. We could consider keeping the 
dictionary-related things `@ApiMayChange` to expedite the mergability of this 
PR while still giving us room to iterate later.
   
   So the core premise of `ZstdDictionary` is for it to be a stable API that is 
decoupled from zstd-jni (incase other future better implementations come 
along). I can still put in `@ApiMayChange` but it is in contention with that 
core point.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to