source: josm/trunk/src/org/tukaani/xz/common/Util.java@ 15851

Last change on this file since 15851 was 13350, checked in by stoecker, 7 years ago

see #15816 - add XZ support

File size: 676 bytes
Line 
1/*
2 * Util
3 *
4 * Author: Lasse Collin <lasse.collin@tukaani.org>
5 *
6 * This file has been put into the public domain.
7 * You can do whatever you want with this file.
8 */
9
10package org.tukaani.xz.common;
11
12public class Util {
13 public static final int STREAM_HEADER_SIZE = 12;
14 public static final long BACKWARD_SIZE_MAX = 1L << 34;
15 public static final int BLOCK_HEADER_SIZE_MAX = 1024;
16 public static final long VLI_MAX = Long.MAX_VALUE;
17 public static final int VLI_SIZE_MAX = 9;
18
19 public static int getVLISize(long num) {
20 int size = 0;
21 do {
22 ++size;
23 num >>= 7;
24 } while (num != 0);
25
26 return size;
27 }
28}
Note: See TracBrowser for help on using the repository browser.