GL11.glTexImage2D(GL_TEXTURE_2D, 0, ARBTextureCompression.COMPRESSED_RGBA_ARB, width, height, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, myByteBuffer);
your bytebuffer contains the uncompressed data, the GL will compress it for you as RGBA; Look at EXT_Texture_Compression_S3TC too to get DXT compression.
Whether its effecient or not is a different matter. I suggest you have a look at DXT compression as the B component can be obtained from the R and G components and hence, quick to decode, and quick to encode. This way, you could encode *while* generating which saves you a few pixel touches in the loops.
DP