package com.google.android.gms.internal.gtm; /* loaded from: classes2.dex */ final class zztn { /* JADX INFO: Access modifiers changed from: package-private */ public static String zzd(zzps zzpsVar) { zzto zztoVar = new zzto(zzpsVar); StringBuilder sb = new StringBuilder(zztoVar.size()); for (int i = 0; i < zztoVar.size(); i++) { byte zzak = zztoVar.zzak(i); if (zzak == 34) { sb.append("\\\""); } else if (zzak == 39) { sb.append("\\'"); } else if (zzak != 92) { switch (zzak) { case 7: sb.append("\\a"); break; case 8: sb.append("\\b"); break; case 9: sb.append("\\t"); break; case 10: sb.append("\\n"); break; case 11: sb.append("\\v"); break; case 12: sb.append("\\f"); break; case 13: sb.append("\\r"); break; default: if (zzak >= 32 && zzak <= 126) { sb.append((char) zzak); break; } else { sb.append('\\'); sb.append((char) (((zzak >>> 6) & 3) + 48)); sb.append((char) (((zzak >>> 3) & 7) + 48)); sb.append((char) ((zzak & 7) + 48)); break; } } } else { sb.append("\\\\"); } } return sb.toString(); } }