<commit_before>package ru.serjik.engine.gles20;

import java.io.ByteArrayInputStream;
import java.io.IOException;

import android.graphics.Bitmap;
import android.opengl.ETC1Util;
import android.opengl.GLES20;
import android.opengl.GLUtils;

// glActiveTexture() - to select active slot
// glBindTextre() - to bind a texture to active slot

public class Texture
{
	private int id;

	public Texture(Bitmap bitmap)
	{
		id = create();

		bind();

		GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0);
	}

	public Texture(byte[] pkm)
	{
		id = create();
		bind();

		try
		{
			ETC1Util.loadTexture(GLES20.GL_TEXTURE_2D, 0, 0, GLES20.GL_RGB, GLES20.GL_UNSIGNED_BYTE, new ByteArrayInputStream(pkm));
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
	}

	public static void disable()
	{
		GLES20.glDisable(GLES20.GL_TEXTURE_2D);
	}
<commit_msg>load compressed texture from stream<commit_after>package ru.serjik.engine.gles20;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;

import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.opengl.ETC1Util;
import android.opengl.GLES20;
import android.opengl.GLUtils;

// glActiveTexture() - to select active slot
// glBindTextre() - to bind a texture to active slot

public class Texture
{
	private int id;

	public Texture(Bitmap bitmap)
	{
		id = create();

		bind();

		GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0);
	}

	public Texture(byte[] pkm)
	{
		id = create();
		bind();

		try
		{
			ETC1Util.loadTexture(GLES20.GL_TEXTURE_2D, 0, 0, GLES20.GL_RGB, GLES20.GL_UNSIGNED_BYTE, new ByteArrayInputStream(pkm));
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
	}

	public Texture(String name, AssetManager am)
	{
		id = create();
		bind();

		try
		{
			InputStream inputStream = am.open(name);
			ETC1Util.loadTexture(GLES20.GL_TEXTURE_2D, 0, 0, GLES20.GL_RGB, GLES20.GL_UNSIGNED_BYTE, inputStream);
			inputStream.close();
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
	}

	public static void disable()
	{
		GLES20.glDisable(GLES20.GL_TEXTURE_2D);
	}

{'fraction_non_alphanumeric': 0.11969839773798303, 'fraction_numerical': 0.029217719132893498, 'mean_word_length': 4.1654501216545015, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2126495', 'n_tokens_mistral': 886, 'n_tokens_neox': 787, 'n_words': 163}