Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for estimateCompressionRatio (0.44 sec)

  1. src/test/java/jcifs/smb/compression/DefaultCompressionServiceTest.java

        public void testCompressionRatioEstimation() {
            double ratio = compressionService.estimateCompressionRatio(testData, CompressionService.COMPRESSION_LZ77);
            assertTrue(ratio >= 0.0 && ratio <= 1.0);
    
            double noneRatio = compressionService.estimateCompressionRatio(testData, CompressionService.COMPRESSION_NONE);
            assertEquals(1.0, noneRatio, 0.001);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  2. src/main/java/jcifs/smb/compression/CompressionService.java

         *
         * @param data the data to analyze
         * @param algorithm the compression algorithm
         * @return estimated compression ratio (0.0 to 1.0, where 0.5 means 50% size reduction)
         */
        double estimateCompressionRatio(byte[] data, int algorithm);
    
        /**
         * Gets the minimum data size threshold for compression.
         * Data smaller than this threshold should not be compressed.
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb/compression/DefaultCompressionService.java

            }
            return false;
        }
    
        @Override
        public int[] getSupportedAlgorithms() {
            return SUPPORTED_ALGORITHMS.clone();
        }
    
        @Override
        public double estimateCompressionRatio(byte[] data, int algorithm) {
            if (data == null || data.length == 0) {
                return 1.0;
            }
            if (algorithm == COMPRESSION_NONE) {
                return 1.0;
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.2K bytes
    - Viewed (0)
Back to top