class CompressionUtil {

    static int seemsCompressible(@NotNull Artifact artifact) {
        try (InputStream stream = artifact.getInputStream()) {
            byte[] sample = IOUtils.toByteArray(stream, SAMPLE_LENGTH);
            return isCompressible(sample, SAMPLE_LENGTH) ? 1 : -1;
        } catch (RepositoryException | IOException e) {
            log.warn(e.getMessage(), e);
        }
        return 0;
    }

}