private int getCompression(@Nonnull Info info) {
			switch (compressType) {
				case ALWAYS:
					return DEFLATED;
				case NEVER:
					return STORED;
				case SMART:
					// Get content from info
					byte[] content = null;
					if (info.isFile())
						content = info.asFile().getRawContent();
					else if (info.isClass()) {
						ClassInfo classInfo = info.asClass();
						if (classInfo.isJvmClass())
							content = classInfo.asJvmClass().getBytecode();
					}

					// Validate
					if (content == null)
						throw new IllegalStateException("Unhandled info type, cannot get byte[]: " + info.getClass().getName());

					// Check if deflate would be more optimal.
					InputStream in = new ByteArrayInputStream(content);
					ByteArrayOutputStream out = new ByteArrayOutputStream();
					try (DeflaterOutputStream deflate = new DeflaterOutputStream(out)) {
						byte[] buffer = new byte[2048];
						int len;
						while ((len = in.read(buffer)) > 0) {
							deflate.write(buffer, 0, len);
						}
						deflate.finish();
						int inputSize = content.length;
						int compressedSize = out.size();
						if (compressedSize < inputSize)
							return DEFLATED;
					} catch (IOException ignored) {
						// Cannot compress
					}
					return STORED;
				case MATCH_ORIGINAL:
				default:
					return ZipCompressionProperty.getOr(info, DEFLATED);

			}
		}
@param info
		Info to get compression for.

@return Compression type for into value.
recaf-core/src/main/java/software/coley/recaf/services/workspace/io/WorkspaceExportOptions.java