<commit_before>goog.provide('ol.source.Zoomify');

goog.require('goog.array');
goog.require('goog.asserts');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('ol.ImageTile');
goog.require('ol.TileCoord');
goog.require('ol.TileState');
goog.require('ol.TileUrlFunction');
goog.require('ol.proj');
goog.require('ol.source.TileImage');
goog.require('ol.tilegrid.Zoomify');



/**
 * @constructor
 * @extends {ol.source.TileImage}
 * @param {olx.source.ZoomifyOptions=} opt_options Options.
 * @todo stability experimental
 */
ol.source.Zoomify = function(opt_options) {

  var options = goog.isDef(opt_options) ? opt_options : {};

  var size = options.size;

  var imageSize = size.slice();
  var tiles = [
    Math.ceil(imageSize[0] / ol.DEFAULT_TILE_SIZE),
    Math.ceil(imageSize[1] / ol.DEFAULT_TILE_SIZE)
  ];
  var tierSizeInTiles = [tiles];
  var tierImageSize = [imageSize];

  while (imageSize[0] > ol.DEFAULT_TILE_SIZE ||
      imageSize[1] > ol.DEFAULT_TILE_SIZE) {

    imageSize = [
      Math.floor(imageSize[0] / 2),
      Math.floor(imageSize[1] / 2)
    ];
    tiles = [
      Math.ceil(imageSize[0] / ol.DEFAULT_TILE_SIZE),
      Math.ceil(imageSize[1] / ol.DEFAULT_TILE_SIZE)
    ];
    tierSizeInTiles.push(tiles);
    tierImageSize.push(imageSize);
  }

  tierSizeInTiles.reverse();
  tierImageSize.reverse();
  var numberOfTiers = tierSizeInTiles.length;
  var resolutions = [1];
  var tileCountUpToTier = [0];
  var i;
  for (i = 1; i < numberOfTiers; i++) {
    resolutions.unshift(Math.pow(2, i));
    tileCountUpToTier.push(
        tierSizeInTiles[i - 1][0] * tierSizeInTiles[i - 1][1] +
        tileCountUpToTier[i - 1]
    );
  }<commit_msg>Remove unused variable<commit_after>goog.provide('ol.source.Zoomify');

goog.require('goog.array');
goog.require('goog.asserts');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('ol.ImageTile');
goog.require('ol.TileCoord');
goog.require('ol.TileState');
goog.require('ol.TileUrlFunction');
goog.require('ol.proj');
goog.require('ol.source.TileImage');
goog.require('ol.tilegrid.Zoomify');



/**
 * @constructor
 * @extends {ol.source.TileImage}
 * @param {olx.source.ZoomifyOptions=} opt_options Options.
 * @todo stability experimental
 */
ol.source.Zoomify = function(opt_options) {

  var options = goog.isDef(opt_options) ? opt_options : {};

  var size = options.size;

  var imageSize = size.slice();
  var tiles = [
    Math.ceil(imageSize[0] / ol.DEFAULT_TILE_SIZE),
    Math.ceil(imageSize[1] / ol.DEFAULT_TILE_SIZE)
  ];
  var tierSizeInTiles = [tiles];

  while (imageSize[0] > ol.DEFAULT_TILE_SIZE ||
      imageSize[1] > ol.DEFAULT_TILE_SIZE) {

    imageSize = [
      Math.floor(imageSize[0] / 2),
      Math.floor(imageSize[1] / 2)
    ];
    tiles = [
      Math.ceil(imageSize[0] / ol.DEFAULT_TILE_SIZE),
      Math.ceil(imageSize[1] / ol.DEFAULT_TILE_SIZE)
    ];
    tierSizeInTiles.push(tiles);
  }

  tierSizeInTiles.reverse();
  var numberOfTiers = tierSizeInTiles.length;
  var resolutions = [1];
  var tileCountUpToTier = [0];
  var i;
  for (i = 1; i < numberOfTiers; i++) {
    resolutions.unshift(Math.pow(2, i));
    tileCountUpToTier.push(
        tierSizeInTiles[i - 1][0] * tierSizeInTiles[i - 1][1] +
        tileCountUpToTier[i - 1]
    );
  }
{'fraction_non_alphanumeric': 0.16565533980582525, 'fraction_numerical': 0.011529126213592233, 'mean_word_length': 3.841409691629956, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6588810', 'n_tokens_mistral': 1271, 'n_tokens_neox': 1205, 'n_words': 179}