BZip2Constants.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. /*
  4. * Licensed to the Apache Software Foundation (ASF) under one or more
  5. * contributor license agreements. See the NOTICE file distributed with
  6. * this work for additional information regarding copyright ownership.
  7. * The ASF licenses this file to You under the Apache License, Version 2.0
  8. * (the "License"); you may not use this file except in compliance with
  9. * the License. You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. *
  19. */
  20. /*
  21. * This package is based on the work done by Keiron Liddle, Aftex Software
  22. * <keiron@aftexsw.com> to whom the Ant project is very grateful for his
  23. * great code.
  24. */
  25. namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Bzip2
  26. {
  27. /**
  28. * Base class for both the compress and decompress classes.
  29. * Holds common arrays, and static data.
  30. *
  31. * @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
  32. */
  33. public class BZip2Constants
  34. {
  35. public const int baseBlockSize = 100000;
  36. public const int MAX_ALPHA_SIZE = 258;
  37. public const int MAX_CODE_LEN = 20;
  38. public const int MAX_CODE_LEN_GEN = 17;
  39. public const int RUNA = 0;
  40. public const int RUNB = 1;
  41. public const int N_GROUPS = 6;
  42. public const int G_SIZE = 50;
  43. public const int N_ITERS = 4;
  44. public const int MAX_SELECTORS = 2 + (900000 / G_SIZE);
  45. public const int NUM_OVERSHOOT_BYTES = 20;
  46. }
  47. }
  48. #pragma warning restore
  49. #endif